X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-zsh.git;a=blobdiff_plain;f=bin%2Faxzshctl;h=8298743a5a13bce228e173dccc16f34fb30c7443;hp=b5dfb7244e32d288d666854e42d247ba559c0c54;hb=3c2e311872f54b6639122a085a969a41fb52e919;hpb=cf5f5ae4361a353f23b333c41f58130242a0a996 diff --git a/bin/axzshctl b/bin/axzshctl index b5dfb72..8298743 100755 --- a/bin/axzshctl +++ b/bin/axzshctl @@ -23,22 +23,20 @@ function Usage { echo echo " enable" echo " Enable AX-ZSH altogether." - echo echo " disable" echo " Disable AX-ZSH altogether." echo echo " enable-plugin [ [...]]" echo " Enable plugin(s)." - echo echo " disable-plugin [ [...]]" echo " Disable plugin(s)." + echo " list-enabled" + echo " List enabled plugins." echo echo " reset-plugins" echo " Reset active plugins to the default set." - echo echo " enable-default-plugins" echo " Enable all default plugins." - echo echo " check-plugins" echo " Detect plugins which are \"useful\" on this system." echo @@ -136,6 +134,13 @@ function DisablePlugin { return $r } +function ListEnabledPlugins { + for plugin ($AXZSH/active_plugins/*(N)); do + print ${plugin:t:s/#/\//} + done + return 0 +} + function ResetPlugins { local dir="$AXZSH/active_plugins" local r1=0, r2=0 @@ -323,6 +328,10 @@ case "$cmd" in DisablePlugin "$plugin" done ;; + "list-enabled") + [[ $# -eq 0 ]] || Usage + ListEnabledPlugins + ;; "reset-plugins") [[ $# -eq 0 ]] || Usage ResetPlugins