X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=ax.zsh;h=d061aea1a173e328fcc5000d81796ef207e0c1c6;hb=7ede45eb69879249f28a325a8fc672b7ea5aeb39;hp=5f8e662fe2a6c108e63854fc6b03041f4d913e19;hpb=5622a0fe5c67096841430db425f839ce472c4ba5;p=ax-zsh.git diff --git a/ax.zsh b/ax.zsh index 5f8e662..d061aea 100644 --- a/ax.zsh +++ b/ax.zsh @@ -4,6 +4,8 @@ script_name="$(basename -- "${(%):-%N}")" script_type="$script_name[2,-1]" +[[ -f "$HOME/.axzsh.debug" ]] && echo "» $script_name:" + # Load plugin code of a given type. # - $1: plugin name # - $2: plugin type (optional; defaults to "zshrc") @@ -11,11 +13,12 @@ function axzsh_load_plugin { plugin="$1" [[ -z "$2" ]] && type="zshrc" || type="$2" - for dname in \ - "$AXZSH_PLUGIN_D/$plugin" \ - "$AXZSH/plugins/$plugin" \ - "$AXZSH/core/$plugin" \ - ; do + for dname ( + "$AXZSH_PLUGIN_D/$plugin" + "$ZSH_CUSTOM/$plugin" + "$AXZSH/plugins/$plugin" + "$AXZSH/core/$plugin" + ); do [[ ! -d "$dname" ]] && continue fname="$dname/$plugin.$type" @@ -53,7 +56,10 @@ function axzsh_load_plugin { # Make sure that "AXZSH" variable is set and exported if [[ -z "$AXZSH" ]]; then export AXZSH="$HOME/.axzsh" - [[ -f "$HOME/.axzsh.debug" ]] && echo "AXZSH=$AXZSH" + if [[ -f "$HOME/.axzsh.debug" ]]; then + echo "AXZSH=$AXZSH" + echo "AXZSH_PLUGIN_D=$AXZSH_PLUGIN_D" + fi fi # Setup list of default plugins if not set already. This allows users to @@ -62,9 +68,9 @@ typeset -U axzsh_default_plugins if ! typeset +m axzsh_default_plugins | fgrep array >/dev/null 2>&1; then axzsh_default_plugins=( byebye - completion correction history + less ls prompt ssh @@ -84,7 +90,6 @@ plugin_list=( ) # Read in all the plugins for the current "type": -[[ -f "$HOME/.axzsh.debug" ]] && echo "» $script_name:" for plugin ($plugin_list); do axzsh_load_plugin "$(basename "$plugin")" "$script_type" done