From 357dd7507211aab916800bad02f30ec1f21396fd Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 27 Jan 2015 02:01:16 +0100 Subject: [PATCH] Do not use -i (insecure) with compinit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was added in 99d72ca, to work around warnings with `sudo -s`. `sudo -s` seems to cause a lot of other issues anyway, where files get owned by root etc. I think it's better to be safe by default. From zsh's man page: For security reasons compinit also checks if the completion system would use files not owned by root or by the cur‐ rent user, or files in directories that are world- or group-writable or that are not owned by root or by the cur‐ rent user. If such files or directories are found, compinit will ask if the completion system should really be used. To avoid these tests and make all files found be used without asking, use the option -u, and to make compinit silently ignore all insecure files and directories use the option -i. This security check is skipped entirely when the -C option is given. --- oh-my-zsh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index d75b521c7..8e5345465 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -54,7 +54,7 @@ fi # Load and run compinit autoload -U compinit -compinit -i -d "${ZSH_COMPDUMP}" +compinit -d "${ZSH_COMPDUMP}" # Load all of the plugins that were defined in ~/.zshrc for plugin ($plugins); do