]> arthur.barton.de Git - ax-zsh.git/blobdiff - ax.zsh
New plugin "less"
[ax-zsh.git] / ax.zsh
diff --git a/ax.zsh b/ax.zsh
index d25a237e52f2667062a2b79cbfc3bdec69670bb6..f92d8a8b6622ac54ef9b38b0479a9d1938d0eb98 100644 (file)
--- a/ax.zsh
+++ b/ax.zsh
@@ -1,6 +1,11 @@
 # AX-ZSH: Alex' Modular ZSH Configuration
 # Copyright (c) 2015 Alexander Barton <alex@barton.de>
 
+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")
@@ -50,7 +55,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
@@ -59,9 +67,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
@@ -81,9 +89,6 @@ plugin_list=(
 )
 
 # Read in all the plugins for the current "type":
-script_name="$(basename -- "${(%):-%N}")"
-script_type="$script_name[2,-1]"
-[[ -f "$HOME/.axzsh.debug" ]] && echo "» $script_name:"
 for plugin ($plugin_list); do
        axzsh_load_plugin "$(basename "$plugin")" "$script_type"
 done