From 08cbbb7837e9fb8bf21ff4dd7253562e0385b354 Mon Sep 17 00:00:00 2001 From: lxyu Date: Mon, 22 Oct 2012 18:01:38 +0800 Subject: [PATCH] fix "no such file" bug for non-ubuntu system --- plugins/command-not-found/command-not-found.plugin.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh index 5ab03d5a9..0e2684171 100644 --- a/plugins/command-not-found/command-not-found.plugin.zsh +++ b/plugins/command-not-found/command-not-found.plugin.zsh @@ -2,4 +2,6 @@ # as seen in http://www.porcheron.info/command-not-found-for-zsh/ # this is installed in Ubuntu -source /etc/zsh_command_not_found +if [[ -f "/etc/zsh_command_not_found" ]]; then + source /etc/zsh_command_not_found +fi