From 4cdffcd4858c7818e5325c03909d75e41995eeae Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 25 Feb 2019 21:30:00 +0100 Subject: init: cut down on the number of compaudit calls --- oh-my-zsh.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'oh-my-zsh.sh') diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index d7c68d35c..4f6bfd5a5 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -69,14 +69,12 @@ fi if [[ $ZSH_DISABLE_COMPFIX != true ]]; then # If completion insecurities exist, warn the user - if ! compaudit &>/dev/null; then - handle_completion_insecurities - fi + handle_completion_insecurities # Load only from secure directories - compinit -i -d "${ZSH_COMPDUMP}" + compinit -i -C -d "${ZSH_COMPDUMP}" else # If the user wants it, load from all found directories - compinit -u -d "${ZSH_COMPDUMP}" + compinit -u -C -d "${ZSH_COMPDUMP}" fi # Load all of the plugins that were defined in ~/.zshrc -- cgit v1.2.3-70-g09d2 From 779ff24c2d0091ebbddae938d12b3f117123fc29 Mon Sep 17 00:00:00 2001 From: SomeDer <48731521+SomeDer@users.noreply.github.com> Date: Thu, 21 Mar 2019 19:25:41 +0000 Subject: init: notify user if plugin isn't found (#7679) --- oh-my-zsh.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'oh-my-zsh.sh') diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 4f6bfd5a5..fbb10dd82 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -83,6 +83,8 @@ for plugin ($plugins); do source $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then source $ZSH/plugins/$plugin/$plugin.plugin.zsh + else + echo "Warning: plugin $plugin not found" fi done -- cgit v1.2.3-70-g09d2 From 1e11a3c112f47ee87f432a5410755239ff43b0bb Mon Sep 17 00:00:00 2001 From: Avi ד Date: Fri, 22 Mar 2019 14:37:08 -0400 Subject: init: fix erroneous plugin not found warning (#7686) Co-authored-by: Se De --- oh-my-zsh.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'oh-my-zsh.sh') diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index fbb10dd82..e080257c1 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -44,6 +44,7 @@ is_plugin() { test -f $base_dir/plugins/$name/$name.plugin.zsh \ || test -f $base_dir/plugins/$name/_$name } + # Add all defined plugins to fpath. This must be done # before running compinit. for plugin ($plugins); do @@ -51,6 +52,8 @@ for plugin ($plugins); do fpath=($ZSH_CUSTOM/plugins/$plugin $fpath) elif is_plugin $ZSH $plugin; then fpath=($ZSH/plugins/$plugin $fpath) + else + echo "Warning: plugin $plugin not found" fi done @@ -83,8 +86,6 @@ for plugin ($plugins); do source $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then source $ZSH/plugins/$plugin/$plugin.plugin.zsh - else - echo "Warning: plugin $plugin not found" fi done -- cgit v1.2.3-70-g09d2 From 3a6bf6bd26b809577d42cb606e05e9ea75373d5e Mon Sep 17 00:00:00 2001 From: Greg Date: Wed, 3 Apr 2019 12:20:16 +0100 Subject: init: more informative warning if plugin not found (#7727) --- oh-my-zsh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'oh-my-zsh.sh') diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index e080257c1..b1460b1d7 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -53,7 +53,7 @@ for plugin ($plugins); do elif is_plugin $ZSH $plugin; then fpath=($ZSH/plugins/$plugin $fpath) else - echo "Warning: plugin $plugin not found" + echo "[oh-my-zsh] plugin '$plugin' not found" fi done -- cgit v1.2.3-70-g09d2 From ea3e666e04bfae31b37ef42dfe54801484341e46 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 7 May 2019 21:29:10 +0200 Subject: init: run compinit before loading lib/ files --- lib/directories.zsh | 1 + oh-my-zsh.sh | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'oh-my-zsh.sh') diff --git a/lib/directories.zsh b/lib/directories.zsh index 355c442d2..cf87bd7e4 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -21,6 +21,7 @@ alias 9='cd -9' alias md='mkdir -p' alias rd=rmdir + function d () { if [[ -n $1 ]]; then dirs "$@" diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index b1460b1d7..6b2662d5e 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -29,15 +29,6 @@ if [[ -z "$ZSH_CUSTOM" ]]; then fi -# Load all of the config files in ~/oh-my-zsh that end in .zsh -# TIP: Add files you don't want in git to .gitignore -for config_file ($ZSH/lib/*.zsh); do - custom_config_file="${ZSH_CUSTOM}/lib/${config_file:t}" - [ -f "${custom_config_file}" ] && config_file=${custom_config_file} - source $config_file -done - - is_plugin() { local base_dir=$1 local name=$2 @@ -71,6 +62,7 @@ if [ -z "$ZSH_COMPDUMP" ]; then fi if [[ $ZSH_DISABLE_COMPFIX != true ]]; then + source $ZSH/lib/compfix.zsh # If completion insecurities exist, warn the user handle_completion_insecurities # Load only from secure directories @@ -80,6 +72,15 @@ else compinit -u -C -d "${ZSH_COMPDUMP}" fi + +# Load all of the config files in ~/oh-my-zsh that end in .zsh +# TIP: Add files you don't want in git to .gitignore +for config_file ($ZSH/lib/*.zsh); do + custom_config_file="${ZSH_CUSTOM}/lib/${config_file:t}" + [ -f "${custom_config_file}" ] && config_file=${custom_config_file} + source $config_file +done + # Load all of the plugins that were defined in ~/.zshrc for plugin ($plugins); do if [ -f $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh ]; then -- cgit v1.2.3-70-g09d2