X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=shell-completion%2Fzsh%2F_systemctl.in;h=7f2d5ac0fa689b7357bfdd3c13e2703f09b03391;hp=7eefe53aecc589d7043b08a5b54b66f3c799ad46;hb=5ad096b3f1331b175340129a8c9a5a9d711e5415;hpb=81333ecf9d5497f8aa95f7fec23c67b869d5abf9 diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in index 7eefe53ae..7f2d5ac0f 100644 --- a/shell-completion/zsh/_systemctl.in +++ b/shell-completion/zsh/_systemctl.in @@ -33,6 +33,7 @@ "preset:Enable/disable one or more unit files based on preset configuration" "set-default:Set the default target" "get-default:Query the default target" + "edit:Edit one or more unit files" "is-system-running:Query overall status of the system" "help:Show documentation for specified units" "list-dependencies:Show unit dependency tree" @@ -136,12 +137,11 @@ _filter_units_by_property() { unit=${units[i]} prop=${(f)"$(_call_program units "$service show --no-pager --property="$property" ${unit} 2>/dev/null")"} if [[ "${prop}" = "$property=$value" ]]; then - echo " ${unit}" + echo -E - " ${unit}" fi done } -_systemctl_all_units() { { __systemctl list-unit-files; __systemctl list-units --all; } | { while read -r a b; do [[ $a =~ @\. ]] || echo -E - " $a"; done; } } _systemctl_get_template_names() { __systemctl list-unit-files | { while read -r a b; do [[ $a =~ @\. ]] && echo -E - " ${a%%@.*}@"; done; } } @@ -170,7 +170,7 @@ _systemctl_disabled_units(){_sys_disabled_units=($(__systemctl list-unit-files _systemctl_masked_units() {_sys_masked_units=( $(__systemctl list-unit-files | { while read -r a b; do [[ $b == "masked" ]] && echo -E - " $a"; done; }) )} # Completion functions for ALL_UNITS -for fun in is-active is-failed is-enabled status show cat mask preset help list-dependencies ; do +for fun in is-active is-failed is-enabled status show cat mask preset help list-dependencies edit ; do (( $+functions[_systemctl_$fun] )) || _systemctl_$fun() { _systemctl_really_all_units