]> arthur.barton.de Git - ax-zsh.git/commitdiff
Fix core plugin numbering
authorAlexander Barton <alex@barton.de>
Tue, 28 Dec 2021 12:47:45 +0000 (13:47 +0100)
committerAlexander Barton <alex@barton.de>
Tue, 28 Dec 2021 12:48:02 +0000 (13:48 +0100)
[0-4]*: Runs pre-plugins
[5-9]*: Runs post-plugins

ax.zsh
core/30_path/30_path.zprofile [new file with mode: 0644]
core/40_axzsh/40_axzsh.zshrc [new file with mode: 0644]
core/40_axzsh/functions/_axzsh [new file with mode: 0644]
core/40_completion/40_completion.zshrc [new file with mode: 0644]
core/40_path/40_path.zprofile [deleted file]
core/40_prompt/40_prompt.zshrc [new file with mode: 0644]
core/50_axzsh/50_axzsh.zshrc [deleted file]
core/50_axzsh/functions/_axzsh [deleted file]
core/50_completion/50_completion.zshrc [deleted file]
core/50_prompt/50_prompt.zshrc [deleted file]

diff --git a/ax.zsh b/ax.zsh
index 00c242ee55decc317b031aae6cababa0f3655d2f..edda7093f6fd9e533c8bd4e62d1c9be5041d765e 100644 (file)
--- a/ax.zsh
+++ b/ax.zsh
@@ -55,9 +55,9 @@ function axzsh_handle_stage {
                local plugin_list
                typeset -U plugin_list
                plugin_list=(
-                       "$AXZSH/core/"[0-5]*
+                       "$AXZSH/core/"[0-4]*
                        "$AXZSH/active_plugins/"*(N)
-                       "$AXZSH/core/"[6-9]*
+                       "$AXZSH/core/"[5-9]*
                )
 
                # Create new cache file:
diff --git a/core/30_path/30_path.zprofile b/core/30_path/30_path.zprofile
new file mode 100644 (file)
index 0000000..0349029
--- /dev/null
@@ -0,0 +1,61 @@
+# AX-ZSH: Alex' Modular ZSH Configuration
+# 40_path.zprofile: Setup PATH environment
+
+# Set default PATH
+if [[ -x /usr/libexec/path_helper ]]; then
+       eval "$(/usr/libexec/path_helper)"
+else
+       PATH="/usr/sbin:/usr/bin:/sbin:/bin"
+fi
+typeset -Ux PATH
+
+# Prepend additional search paths
+for d (
+       /Developer/usr/bin
+       /usr/ucb
+       /usr/pkg/bin
+       /usr/local/bin
+       /usr/local/sbin
+       /opt/*/bin(NOn)
+       /opt/*/sbin(NOn)
+       /home/linuxbrew/.linuxbrew/bin
+       /home/linuxbrew/.linuxbrew/sbin
+       ~/.linuxbrew/bin
+       ~/.linuxbrew/sbin
+       ~/.gem/ruby/*/bin(NOn)
+       ~/.go/bin
+       ~/.cargo/bin
+       ~/.local/bin
+       ~/bin
+       ~/sbin
+       ~/Applications
+); do
+       [[ -d "$d" ]] && path=("$d" $path)
+done
+
+# Append additional search paths
+for d (
+       /usr/X11/bin
+       /usr/local/games
+       /usr/games
+); do
+       [[ -d "$d" ]] && path=($path "$d")
+done
+
+# Set default MANPATH
+MANPATH="$(manpath -q)" 2>/dev/null
+if [[ $? -ne 0 ]]; then
+       for d (
+               ~/share/man
+               ~/man
+               ~/.linuxbrew/share/man
+               /home/linuxbrew/.linuxbrew/share/man
+               /opt/*/share/man(NOn)
+               /opt/*/man(NOn)
+               /usr/share/man
+               /usr/local/share/man
+       ); do
+               [[ -d "$d" ]] && manpath=($manpath "$d")
+       done
+fi
+typeset -Ux MANPATH
diff --git a/core/40_axzsh/40_axzsh.zshrc b/core/40_axzsh/40_axzsh.zshrc
new file mode 100644 (file)
index 0000000..be6f0b8
--- /dev/null
@@ -0,0 +1,20 @@
+# AX-ZSH: Alex' Modular ZSH Configuration
+# 50_axzsh.zshrc: Initialize AX-ZSH
+
+function axzshctl() {
+       zsh "$AXZSH/bin/axzshctl" "$@" || return $?
+
+       case "$1" in
+               "disable"*|"enable"*|"reset"*|"set"*|"up"*)
+                       # Command which potentially "changed state".
+                       if [[ -o login ]]; then
+                               echo "Restarting login shell ..."
+                               exec -l "$SHELL"
+                       else
+                               echo "Restarting shell ..."
+                               exec "$SHELL"
+                       fi
+                       ;;
+       esac
+       return 0
+}
diff --git a/core/40_axzsh/functions/_axzsh b/core/40_axzsh/functions/_axzsh
new file mode 100644 (file)
index 0000000..960a76b
--- /dev/null
@@ -0,0 +1,51 @@
+#compdef axzshctl
+
+_axzshctl() {
+       _arguments \
+               '1: :((
+                       enable\:"Enable AX-ZSH."
+                       disable\:"Disable AX-ZSH."
+                       enable-plugin\:"Enable plugin(s)."
+                       disable-plugin\:"Disable plugin(s)."
+                       list-enabled\:"List enabled plugin(s)."
+                       reset-plugins\:"Reset active plugins to the default set."
+                       enable-default-plugins\:"Enable all default plugins."
+                       check-plugins\:"Check \"useful\" plugins."
+                       set-theme\:"Set active theme."
+                       upgrade\:"Upgrade AX-ZSH installation (requires Git)."
+                       update-caches\:"Force rebuild of all cache files."
+               ))' \
+               '*: :->args'
+#
+       case "$state" in
+         'args')
+               case "$words[2]" in
+                 "enable-plugin")
+                       compadd "$@" -- \
+                               "$AXZSH"/plugins/*(/:t) \
+                               "$AXZSH"/custom_plugins/*(N/:t) \
+                               "$AXZSH"/repos/*(/:t:s/#/\\/)
+                       for r in "$AXZSH"/repos/@*(N/); do
+                               b=(echo $r(:t))
+                               compadd "$@" -- \
+                                       $(echo $r/plugins/*(N:t) | sed -E "s/(^| )/ $b\//g")
+                       done
+                       ;;
+                 "disable-plugin")
+                       compadd "$@" -- \
+                               "$AXZSH"/active_plugins/*(:t:s/#/\\/)
+                       ;;
+                 "set-theme")
+                       compadd "$@" -- "-" \
+                               "$AXZSH"/themes/*.axzshtheme(:r:t) \
+                               "$AXZSH"/custom_themes/*.axzshtheme(N:r:t) \
+                               "$AXZSH"/custom_themes/*.zsh-theme(N:r:t) \
+                               "$AXZSH"/repos/*/*.axzshtheme(N:r:t) \
+                               "$AXZSH"/repos/*/*.zsh-theme(N:r:t)
+                       ;;
+               esac
+               ;;
+       esac
+}
+
+_axzshctl "$@"
diff --git a/core/40_completion/40_completion.zshrc b/core/40_completion/40_completion.zshrc
new file mode 100644 (file)
index 0000000..14dd03a
--- /dev/null
@@ -0,0 +1,68 @@
+# AX-ZSH: Alex' Modular ZSH Configuration
+# 50_completion.zshrc: Setup completion
+
+autoload -Uz compinit
+
+zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
+
+zstyle ':completion:*' accept-exact '*(N)'
+zstyle ':completion:*' list-colors ''
+zstyle ':completion:*' menu select
+zstyle ':completion:*' special-dirs true
+zstyle ':completion:*' group-name ''
+zstyle ':completion:*' squeeze-slashes true
+
+# Messages
+zstyle ':completion:*:corrections' format '%B%d%b (%e errors)'
+zstyle ':completion:*:descriptions' format '%B%d%b'
+zstyle ':completion:*:messages' format '%B%F{yellow}%d%f%b'
+zstyle ':completion:*:warnings' format '%B%F{red}No matches found!%f%b'
+
+# Use caching so that commands like apt and dpkg completions are useable
+zstyle ':completion:*' use-cache on
+zstyle ':completion:*' cache-path "$ZSH_CACHE_DIR"
+
+# Manual pages
+zstyle ':completion:*:manuals' separate-sections true
+zstyle ':completion:*:manuals.*' insert-sections true
+
+# Don't complete uninteresting users
+zstyle ':completion:*:*:*:users' ignored-patterns \
+       adm amanda amavis apache arpwatch at avahi avahi-autoipd backup \
+       beaglidx bin bind cacti canna clamav cockpit-ws cockpit-wsinstance \
+       colord daapd daemon dbus distcache dnsmasq dovecot dovenull fax \
+       fetchmail firebird ftp games gdm gkrellmd gnats gopher hacluster \
+       haldaemon halt hsqldb ident irc junkbust kdm ldap libuuid libvirt-qemu \
+       list logcheck lp mail mailman mailnull man messagebus mldonkey mysql \
+       nagios named netdata netdump news nfsnobody nobody nscd ntp nut nx \
+       obsrun oident openvpn operator pcap polkitd postfix postgres postgrey \
+       privoxy proxy pvm quagga radvd rpc rpcuser rpm rslsync rtkit rwhod \
+       sbuild scard shutdown squid sshd statd stunnel4 svn sync sys \
+       systemd-coredump systemd-journal-remote systemd-network systemd-resolve \
+       systemd-timesync telnetd telnetd-ssl tftp thelounge usbmux uucp uuidd \
+       vcsa www-data wwwrun xfs xrdp zabbix  \
+       '_*' '*$' 'debian-*' 'Debian-*'
+
+# Ignore completion functions
+zstyle ':completion:*:functions' ignored-patterns '_*'
+
+# Show ignore matches, if we really want this
+zstyle '*' single-ignored show
+
+# Save the location of the current completion dump file.
+if [[ -z "$ZSH_COMPDUMP" ]]; then
+       ZSH_COMPDUMP="$ZSH_CACHE_DIR/zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
+fi
+
+# Try to add all folders possibly containing completion functions to the fpath
+# before calling compinit. See <https://github.com/ohmyzsh/ohmyzsh/issues/4614>
+# for a discussion of this topic, for example. It boils down to:
+# - We have to call compinit early,
+# - but plugins can add completions later, that won't be found ...
+# (GENCOMPL_FPATH is used by RobSis/zsh-completion-generator)
+[[ -n "$GENCOMPL_FPATH" ]] && fpath+=($GENCOMPL_FPATH)
+fpath+=("$AXZSH/active_plugins/"*/completions(N))
+fpath+=("$AXZSH/active_plugins/"*/src(N))
+
+# Initialize ZSH completion system
+compinit -d "$ZSH_COMPDUMP"
diff --git a/core/40_path/40_path.zprofile b/core/40_path/40_path.zprofile
deleted file mode 100644 (file)
index 0349029..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-# AX-ZSH: Alex' Modular ZSH Configuration
-# 40_path.zprofile: Setup PATH environment
-
-# Set default PATH
-if [[ -x /usr/libexec/path_helper ]]; then
-       eval "$(/usr/libexec/path_helper)"
-else
-       PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-fi
-typeset -Ux PATH
-
-# Prepend additional search paths
-for d (
-       /Developer/usr/bin
-       /usr/ucb
-       /usr/pkg/bin
-       /usr/local/bin
-       /usr/local/sbin
-       /opt/*/bin(NOn)
-       /opt/*/sbin(NOn)
-       /home/linuxbrew/.linuxbrew/bin
-       /home/linuxbrew/.linuxbrew/sbin
-       ~/.linuxbrew/bin
-       ~/.linuxbrew/sbin
-       ~/.gem/ruby/*/bin(NOn)
-       ~/.go/bin
-       ~/.cargo/bin
-       ~/.local/bin
-       ~/bin
-       ~/sbin
-       ~/Applications
-); do
-       [[ -d "$d" ]] && path=("$d" $path)
-done
-
-# Append additional search paths
-for d (
-       /usr/X11/bin
-       /usr/local/games
-       /usr/games
-); do
-       [[ -d "$d" ]] && path=($path "$d")
-done
-
-# Set default MANPATH
-MANPATH="$(manpath -q)" 2>/dev/null
-if [[ $? -ne 0 ]]; then
-       for d (
-               ~/share/man
-               ~/man
-               ~/.linuxbrew/share/man
-               /home/linuxbrew/.linuxbrew/share/man
-               /opt/*/share/man(NOn)
-               /opt/*/man(NOn)
-               /usr/share/man
-               /usr/local/share/man
-       ); do
-               [[ -d "$d" ]] && manpath=($manpath "$d")
-       done
-fi
-typeset -Ux MANPATH
diff --git a/core/40_prompt/40_prompt.zshrc b/core/40_prompt/40_prompt.zshrc
new file mode 100644 (file)
index 0000000..aea921d
--- /dev/null
@@ -0,0 +1,113 @@
+# AX-ZSH: Alex' Modular ZSH Configuration
+# 50_prompt.zshrc: Setup default prompts
+
+# Some dummy functions (used by some OhMyZsh themes, for example) ...
+git_prompt_info(){ true; }
+git_prompt_status(){ true; }
+rvm_prompt_info(){ true; }
+
+# Logname ("user name")
+
+ZSH_THEME_LOGNAME_PROMPT_PREFIX_SPACING=""
+if (( $UID == 0 )); then
+       ZSH_THEME_LOGNAME_PROMPT_PREFIX="%{$fg_no_bold[red]%}" \
+       ZSH_THEME_LOGNAME_PROMPT_SUFFIX="%{$reset_color%}"
+else
+       ZSH_THEME_LOGNAME_PROMPT_PREFIX=""
+       ZSH_THEME_LOGNAME_PROMPT_SUFFIX=""
+fi
+ZSH_THEME_LOGNAME_PROMPT_SUFFIX_SPACING="@"
+
+function axzsh_logname_prompt_root() {
+       (( $UID == 0 )) || return 1
+       return 0
+}
+
+function axzsh_logname_prompt_yn() {
+       local func
+       for func ($axzsh_logname_prompt_functions); do
+               $func || continue
+               echo "${ZSH_THEME_LOGNAME_PROMPT_PREFIX_SPACING}${ZSH_THEME_LOGNAME_PROMPT_PREFIX}${1:-$LOGNAME}${ZSH_THEME_LOGNAME_PROMPT_SUFFIX}${ZSH_THEME_LOGNAME_PROMPT_SUFFIX_SPACING}"
+               return
+       done
+}
+
+axzsh_logname_prompt_functions=(axzsh_logname_prompt_root)
+
+# Hostname
+
+ZSH_THEME_HOSTNAME_PROMPT_PREFIX_SPACING=""
+ZSH_THEME_HOSTNAME_PROMPT_PREFIX=""
+ZSH_THEME_HOSTNAME_PROMPT_SUFFIX=""
+ZSH_THEME_HOSTNAME_PROMPT_SUFFIX_SPACING=":"
+
+function axzsh_hostname_prompt_root() {
+       (( $UID == 0 )) || return 1
+       return 0
+}
+
+function axzsh_hostname_prompt_yn() {
+       local func
+       for func ($axzsh_hostname_prompt_functions); do
+               $func || continue
+               echo "${ZSH_THEME_HOSTNAME_PROMPT_PREFIX_SPACING}${ZSH_THEME_HOSTNAME_PROMPT_PREFIX}${1:-$SHORT_HOST}${ZSH_THEME_HOSTNAME_PROMPT_SUFFIX}${ZSH_THEME_HOSTNAME_PROMPT_SUFFIX_SPACING}"
+               return
+       done
+}
+
+axzsh_hostname_prompt_functions=()
+
+# VCS
+
+if axzsh_is_utf_terminal; then
+       clean="✔"; dirty="✘"; ahead="→"; behind="←"
+else
+       clean="+"; dirty="x"; ahead=">"; behind="<"
+fi
+
+ZSH_THEME_VCS_PROMPT_PREFIX_SPACING="("
+ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg_no_bold[yellow]%}"
+ZSH_THEME_VCS_PROMPT_SUFFIX="%{$fg[default]%}"
+ZSH_THEME_VCS_PROMPT_SUFFIX_SPACING=")"
+
+ZSH_THEME_VCS_PROMPT_CLEAN=" %{$fg_no_bold[green]%}$clean%{$fg[default]%}"
+ZSH_THEME_VCS_PROMPT_DIRTY=" %{$fg_no_bold[red]%}$dirty%{$fg[default]%}"
+ZSH_THEME_VCS_PROMPT_AHEAD="%{$fg_no_bold[cyan]%}$ahead%{$fg[default]%}"
+ZSH_THEME_VCS_PROMPT_BEHIND="%{$fg_no_bold[blue]%}$behind%{$fg[default]%}"
+
+unset clean dirty ahead behind
+
+function axzsh_vcs_prompt() {
+       local func
+       local p
+       for func ($axzsh_vcs_prompt_functions); do
+               p=$( $func ) || continue
+               echo "${ZSH_THEME_VCS_PROMPT_PREFIX_SPACING}${p}${ZSH_THEME_VCS_PROMPT_SUFFIX_SPACING}"
+               return
+       done
+}
+
+axzsh_vcs_prompt_functions=()
+
+# Prompt
+
+ZSH_THEME_PROMPT="$"
+ZSH_THEME_PROMPT_ROOT="#"
+
+ZSH_THEME_PROMPT_PREFIX_SPACING=""
+ZSH_THEME_PROMPT_PREFIX=""
+ZSH_THEME_PROMPT_ROOT_PREFIX=""
+ZSH_THEME_PROMPT_SUFFIX=""
+ZSH_THEME_PROMPT_SUFFIX_SPACING=""
+
+function axzsh_prompt() {
+       local p
+       (( $UID == 0 )) \
+               && p="${ZSH_THEME_PROMPT_ROOT_PREFIX}${ZSH_THEME_PROMPT_ROOT}" \
+               || p="${ZSH_THEME_PROMPT_PREFIX}${ZSH_THEME_PROMPT}"
+       echo "${ZSH_THEME_PROMPT_PREFIX_SPACING}${p}${ZSH_THEME_PROMPT_SUFFIX}${ZSH_THEME_PROMPT_SUFFIX_SPACING}"
+}
+
+# Options and defaults
+
+setopt PROMPT_SUBST
diff --git a/core/50_axzsh/50_axzsh.zshrc b/core/50_axzsh/50_axzsh.zshrc
deleted file mode 100644 (file)
index be6f0b8..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# AX-ZSH: Alex' Modular ZSH Configuration
-# 50_axzsh.zshrc: Initialize AX-ZSH
-
-function axzshctl() {
-       zsh "$AXZSH/bin/axzshctl" "$@" || return $?
-
-       case "$1" in
-               "disable"*|"enable"*|"reset"*|"set"*|"up"*)
-                       # Command which potentially "changed state".
-                       if [[ -o login ]]; then
-                               echo "Restarting login shell ..."
-                               exec -l "$SHELL"
-                       else
-                               echo "Restarting shell ..."
-                               exec "$SHELL"
-                       fi
-                       ;;
-       esac
-       return 0
-}
diff --git a/core/50_axzsh/functions/_axzsh b/core/50_axzsh/functions/_axzsh
deleted file mode 100644 (file)
index 960a76b..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#compdef axzshctl
-
-_axzshctl() {
-       _arguments \
-               '1: :((
-                       enable\:"Enable AX-ZSH."
-                       disable\:"Disable AX-ZSH."
-                       enable-plugin\:"Enable plugin(s)."
-                       disable-plugin\:"Disable plugin(s)."
-                       list-enabled\:"List enabled plugin(s)."
-                       reset-plugins\:"Reset active plugins to the default set."
-                       enable-default-plugins\:"Enable all default plugins."
-                       check-plugins\:"Check \"useful\" plugins."
-                       set-theme\:"Set active theme."
-                       upgrade\:"Upgrade AX-ZSH installation (requires Git)."
-                       update-caches\:"Force rebuild of all cache files."
-               ))' \
-               '*: :->args'
-#
-       case "$state" in
-         'args')
-               case "$words[2]" in
-                 "enable-plugin")
-                       compadd "$@" -- \
-                               "$AXZSH"/plugins/*(/:t) \
-                               "$AXZSH"/custom_plugins/*(N/:t) \
-                               "$AXZSH"/repos/*(/:t:s/#/\\/)
-                       for r in "$AXZSH"/repos/@*(N/); do
-                               b=(echo $r(:t))
-                               compadd "$@" -- \
-                                       $(echo $r/plugins/*(N:t) | sed -E "s/(^| )/ $b\//g")
-                       done
-                       ;;
-                 "disable-plugin")
-                       compadd "$@" -- \
-                               "$AXZSH"/active_plugins/*(:t:s/#/\\/)
-                       ;;
-                 "set-theme")
-                       compadd "$@" -- "-" \
-                               "$AXZSH"/themes/*.axzshtheme(:r:t) \
-                               "$AXZSH"/custom_themes/*.axzshtheme(N:r:t) \
-                               "$AXZSH"/custom_themes/*.zsh-theme(N:r:t) \
-                               "$AXZSH"/repos/*/*.axzshtheme(N:r:t) \
-                               "$AXZSH"/repos/*/*.zsh-theme(N:r:t)
-                       ;;
-               esac
-               ;;
-       esac
-}
-
-_axzshctl "$@"
diff --git a/core/50_completion/50_completion.zshrc b/core/50_completion/50_completion.zshrc
deleted file mode 100644 (file)
index 14dd03a..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-# AX-ZSH: Alex' Modular ZSH Configuration
-# 50_completion.zshrc: Setup completion
-
-autoload -Uz compinit
-
-zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
-
-zstyle ':completion:*' accept-exact '*(N)'
-zstyle ':completion:*' list-colors ''
-zstyle ':completion:*' menu select
-zstyle ':completion:*' special-dirs true
-zstyle ':completion:*' group-name ''
-zstyle ':completion:*' squeeze-slashes true
-
-# Messages
-zstyle ':completion:*:corrections' format '%B%d%b (%e errors)'
-zstyle ':completion:*:descriptions' format '%B%d%b'
-zstyle ':completion:*:messages' format '%B%F{yellow}%d%f%b'
-zstyle ':completion:*:warnings' format '%B%F{red}No matches found!%f%b'
-
-# Use caching so that commands like apt and dpkg completions are useable
-zstyle ':completion:*' use-cache on
-zstyle ':completion:*' cache-path "$ZSH_CACHE_DIR"
-
-# Manual pages
-zstyle ':completion:*:manuals' separate-sections true
-zstyle ':completion:*:manuals.*' insert-sections true
-
-# Don't complete uninteresting users
-zstyle ':completion:*:*:*:users' ignored-patterns \
-       adm amanda amavis apache arpwatch at avahi avahi-autoipd backup \
-       beaglidx bin bind cacti canna clamav cockpit-ws cockpit-wsinstance \
-       colord daapd daemon dbus distcache dnsmasq dovecot dovenull fax \
-       fetchmail firebird ftp games gdm gkrellmd gnats gopher hacluster \
-       haldaemon halt hsqldb ident irc junkbust kdm ldap libuuid libvirt-qemu \
-       list logcheck lp mail mailman mailnull man messagebus mldonkey mysql \
-       nagios named netdata netdump news nfsnobody nobody nscd ntp nut nx \
-       obsrun oident openvpn operator pcap polkitd postfix postgres postgrey \
-       privoxy proxy pvm quagga radvd rpc rpcuser rpm rslsync rtkit rwhod \
-       sbuild scard shutdown squid sshd statd stunnel4 svn sync sys \
-       systemd-coredump systemd-journal-remote systemd-network systemd-resolve \
-       systemd-timesync telnetd telnetd-ssl tftp thelounge usbmux uucp uuidd \
-       vcsa www-data wwwrun xfs xrdp zabbix  \
-       '_*' '*$' 'debian-*' 'Debian-*'
-
-# Ignore completion functions
-zstyle ':completion:*:functions' ignored-patterns '_*'
-
-# Show ignore matches, if we really want this
-zstyle '*' single-ignored show
-
-# Save the location of the current completion dump file.
-if [[ -z "$ZSH_COMPDUMP" ]]; then
-       ZSH_COMPDUMP="$ZSH_CACHE_DIR/zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
-fi
-
-# Try to add all folders possibly containing completion functions to the fpath
-# before calling compinit. See <https://github.com/ohmyzsh/ohmyzsh/issues/4614>
-# for a discussion of this topic, for example. It boils down to:
-# - We have to call compinit early,
-# - but plugins can add completions later, that won't be found ...
-# (GENCOMPL_FPATH is used by RobSis/zsh-completion-generator)
-[[ -n "$GENCOMPL_FPATH" ]] && fpath+=($GENCOMPL_FPATH)
-fpath+=("$AXZSH/active_plugins/"*/completions(N))
-fpath+=("$AXZSH/active_plugins/"*/src(N))
-
-# Initialize ZSH completion system
-compinit -d "$ZSH_COMPDUMP"
diff --git a/core/50_prompt/50_prompt.zshrc b/core/50_prompt/50_prompt.zshrc
deleted file mode 100644 (file)
index aea921d..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-# AX-ZSH: Alex' Modular ZSH Configuration
-# 50_prompt.zshrc: Setup default prompts
-
-# Some dummy functions (used by some OhMyZsh themes, for example) ...
-git_prompt_info(){ true; }
-git_prompt_status(){ true; }
-rvm_prompt_info(){ true; }
-
-# Logname ("user name")
-
-ZSH_THEME_LOGNAME_PROMPT_PREFIX_SPACING=""
-if (( $UID == 0 )); then
-       ZSH_THEME_LOGNAME_PROMPT_PREFIX="%{$fg_no_bold[red]%}" \
-       ZSH_THEME_LOGNAME_PROMPT_SUFFIX="%{$reset_color%}"
-else
-       ZSH_THEME_LOGNAME_PROMPT_PREFIX=""
-       ZSH_THEME_LOGNAME_PROMPT_SUFFIX=""
-fi
-ZSH_THEME_LOGNAME_PROMPT_SUFFIX_SPACING="@"
-
-function axzsh_logname_prompt_root() {
-       (( $UID == 0 )) || return 1
-       return 0
-}
-
-function axzsh_logname_prompt_yn() {
-       local func
-       for func ($axzsh_logname_prompt_functions); do
-               $func || continue
-               echo "${ZSH_THEME_LOGNAME_PROMPT_PREFIX_SPACING}${ZSH_THEME_LOGNAME_PROMPT_PREFIX}${1:-$LOGNAME}${ZSH_THEME_LOGNAME_PROMPT_SUFFIX}${ZSH_THEME_LOGNAME_PROMPT_SUFFIX_SPACING}"
-               return
-       done
-}
-
-axzsh_logname_prompt_functions=(axzsh_logname_prompt_root)
-
-# Hostname
-
-ZSH_THEME_HOSTNAME_PROMPT_PREFIX_SPACING=""
-ZSH_THEME_HOSTNAME_PROMPT_PREFIX=""
-ZSH_THEME_HOSTNAME_PROMPT_SUFFIX=""
-ZSH_THEME_HOSTNAME_PROMPT_SUFFIX_SPACING=":"
-
-function axzsh_hostname_prompt_root() {
-       (( $UID == 0 )) || return 1
-       return 0
-}
-
-function axzsh_hostname_prompt_yn() {
-       local func
-       for func ($axzsh_hostname_prompt_functions); do
-               $func || continue
-               echo "${ZSH_THEME_HOSTNAME_PROMPT_PREFIX_SPACING}${ZSH_THEME_HOSTNAME_PROMPT_PREFIX}${1:-$SHORT_HOST}${ZSH_THEME_HOSTNAME_PROMPT_SUFFIX}${ZSH_THEME_HOSTNAME_PROMPT_SUFFIX_SPACING}"
-               return
-       done
-}
-
-axzsh_hostname_prompt_functions=()
-
-# VCS
-
-if axzsh_is_utf_terminal; then
-       clean="✔"; dirty="✘"; ahead="→"; behind="←"
-else
-       clean="+"; dirty="x"; ahead=">"; behind="<"
-fi
-
-ZSH_THEME_VCS_PROMPT_PREFIX_SPACING="("
-ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg_no_bold[yellow]%}"
-ZSH_THEME_VCS_PROMPT_SUFFIX="%{$fg[default]%}"
-ZSH_THEME_VCS_PROMPT_SUFFIX_SPACING=")"
-
-ZSH_THEME_VCS_PROMPT_CLEAN=" %{$fg_no_bold[green]%}$clean%{$fg[default]%}"
-ZSH_THEME_VCS_PROMPT_DIRTY=" %{$fg_no_bold[red]%}$dirty%{$fg[default]%}"
-ZSH_THEME_VCS_PROMPT_AHEAD="%{$fg_no_bold[cyan]%}$ahead%{$fg[default]%}"
-ZSH_THEME_VCS_PROMPT_BEHIND="%{$fg_no_bold[blue]%}$behind%{$fg[default]%}"
-
-unset clean dirty ahead behind
-
-function axzsh_vcs_prompt() {
-       local func
-       local p
-       for func ($axzsh_vcs_prompt_functions); do
-               p=$( $func ) || continue
-               echo "${ZSH_THEME_VCS_PROMPT_PREFIX_SPACING}${p}${ZSH_THEME_VCS_PROMPT_SUFFIX_SPACING}"
-               return
-       done
-}
-
-axzsh_vcs_prompt_functions=()
-
-# Prompt
-
-ZSH_THEME_PROMPT="$"
-ZSH_THEME_PROMPT_ROOT="#"
-
-ZSH_THEME_PROMPT_PREFIX_SPACING=""
-ZSH_THEME_PROMPT_PREFIX=""
-ZSH_THEME_PROMPT_ROOT_PREFIX=""
-ZSH_THEME_PROMPT_SUFFIX=""
-ZSH_THEME_PROMPT_SUFFIX_SPACING=""
-
-function axzsh_prompt() {
-       local p
-       (( $UID == 0 )) \
-               && p="${ZSH_THEME_PROMPT_ROOT_PREFIX}${ZSH_THEME_PROMPT_ROOT}" \
-               || p="${ZSH_THEME_PROMPT_PREFIX}${ZSH_THEME_PROMPT}"
-       echo "${ZSH_THEME_PROMPT_PREFIX_SPACING}${p}${ZSH_THEME_PROMPT_SUFFIX}${ZSH_THEME_PROMPT_SUFFIX_SPACING}"
-}
-
-# Options and defaults
-
-setopt PROMPT_SUBST