mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-27 20:25:12 +00:00
systemctl completions: add cat & edit commands
This commit is contained in:
parent
1875222e93
commit
1350b44ecf
1 changed files with 4 additions and 2 deletions
|
@ -2,7 +2,7 @@ set -l commands list-units list-sockets start stop reload restart try-restart re
|
||||||
isolate kill is-active is-failed status show get-cgroup-attr set-cgroup-attr unset-cgroup-attr set-cgroup help \
|
isolate kill is-active is-failed status show get-cgroup-attr set-cgroup-attr unset-cgroup-attr set-cgroup help \
|
||||||
reset-failed list-unit-files enable disable is-enabled reenable preset mask unmask link load list-jobs cancel dump \
|
reset-failed list-unit-files enable disable is-enabled reenable preset mask unmask link load list-jobs cancel dump \
|
||||||
list-dependencies snapshot delete daemon-reload daemon-reexec show-environment set-environment unset-environment \
|
list-dependencies snapshot delete daemon-reload daemon-reexec show-environment set-environment unset-environment \
|
||||||
default rescue emergency halt poweroff reboot kexec exit suspend hibernate hybrid-sleep switch-root
|
default rescue emergency halt poweroff reboot kexec exit suspend hibernate hybrid-sleep switch-root cat edit
|
||||||
set -l types services sockets mounts service_paths targets automounts timers
|
set -l types services sockets mounts service_paths targets automounts timers
|
||||||
|
|
||||||
function __fish_systemd_properties
|
function __fish_systemd_properties
|
||||||
|
@ -45,7 +45,9 @@ complete -f -c systemctl -n "not __fish_seen_subcommand_from $commands" -a enabl
|
||||||
complete -f -c systemctl -n "not __fish_seen_subcommand_from $commands" -a disable -d 'Disable one or more units'
|
complete -f -c systemctl -n "not __fish_seen_subcommand_from $commands" -a disable -d 'Disable one or more units'
|
||||||
complete -f -c systemctl -n "not __fish_seen_subcommand_from $commands" -a isolate -d 'Start a unit and dependencies and disable all others'
|
complete -f -c systemctl -n "not __fish_seen_subcommand_from $commands" -a isolate -d 'Start a unit and dependencies and disable all others'
|
||||||
complete -f -c systemctl -n "not __fish_seen_subcommand_from $commands" -a set-default -d 'Set the default target to boot into'
|
complete -f -c systemctl -n "not __fish_seen_subcommand_from $commands" -a set-default -d 'Set the default target to boot into'
|
||||||
for command in start stop restart try-restart reload-or-restart reload-or-try-restart is-active is-failed is-enabled reenable mask loaded link list-dependencies show status
|
complete -f -c systemctl -n "not __fish_seen_subcommand_from $commands" -a cat -d 'Show an unit'
|
||||||
|
complete -f -c systemctl -n "not __fish_seen_subcommand_from $commands" -a edit -d 'Edit an unit'
|
||||||
|
for command in start stop restart try-restart reload-or-restart reload-or-try-restart is-active is-failed is-enabled reenable mask loaded link list-dependencies show cat edit status
|
||||||
for t in $types
|
for t in $types
|
||||||
complete -f -c systemctl -n "__fish_seen_subcommand_from $command" -a "(eval __fish_systemctl_$t)"
|
complete -f -c systemctl -n "__fish_seen_subcommand_from $command" -a "(eval __fish_systemctl_$t)"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue