mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
shell-completion: systemctl edit
This commit is contained in:
parent
17c29493dc
commit
409886c424
2
TODO
2
TODO
@ -813,7 +813,7 @@ External:
|
|||||||
|
|
||||||
* zsh shell completion:
|
* zsh shell completion:
|
||||||
- <command> <verb> -<TAB> should complete options, but currently does not
|
- <command> <verb> -<TAB> should complete options, but currently does not
|
||||||
- systemctl add-wants,add-requires, edit
|
- systemctl add-wants,add-requires
|
||||||
|
|
||||||
|
|
||||||
Regularly:
|
Regularly:
|
||||||
|
@ -139,7 +139,7 @@ _systemctl () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local -A VERBS=(
|
local -A VERBS=(
|
||||||
[ALL_UNITS]='is-active is-failed is-enabled status show cat mask preset help list-dependencies'
|
[ALL_UNITS]='is-active is-failed is-enabled status show cat mask preset help list-dependencies edit'
|
||||||
[ENABLED_UNITS]='disable'
|
[ENABLED_UNITS]='disable'
|
||||||
[DISABLED_UNITS]='enable'
|
[DISABLED_UNITS]='enable'
|
||||||
[REENABLABLE_UNITS]='reenable'
|
[REENABLABLE_UNITS]='reenable'
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
"preset:Enable/disable one or more unit files based on preset configuration"
|
"preset:Enable/disable one or more unit files based on preset configuration"
|
||||||
"set-default:Set the default target"
|
"set-default:Set the default target"
|
||||||
"get-default:Query 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"
|
"is-system-running:Query overall status of the system"
|
||||||
"help:Show documentation for specified units"
|
"help:Show documentation for specified units"
|
||||||
"list-dependencies:Show unit dependency tree"
|
"list-dependencies:Show unit dependency tree"
|
||||||
@ -170,7 +171,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; }) )}
|
_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
|
# 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()
|
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
|
||||||
{
|
{
|
||||||
_systemctl_really_all_units
|
_systemctl_really_all_units
|
||||||
|
Loading…
Reference in New Issue
Block a user