diff options
author | Fabian Homborg <FHomborg@gmail.com> | 2015-02-19 16:02:16 +0100 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2015-03-06 23:05:24 -0800 |
commit | 33c0d93b20cac1ab1e9ed41f659c80b4a0d577c1 (patch) | |
tree | 4259e6a99666e85420c191c3c01f0b2153d27515 /share/functions/__fish_systemctl_scopes.fish | |
parent | 3d163eb9101257527e023267d5b27b7018a972e4 (diff) |
systemctl completions: Add more unit types and commands
It should now support all unit types mentioned in systemd.unit(5)
Diffstat (limited to 'share/functions/__fish_systemctl_scopes.fish')
-rw-r--r-- | share/functions/__fish_systemctl_scopes.fish | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/share/functions/__fish_systemctl_scopes.fish b/share/functions/__fish_systemctl_scopes.fish new file mode 100644 index 00000000..f2f5cbcc --- /dev/null +++ b/share/functions/__fish_systemctl_scopes.fish @@ -0,0 +1,11 @@ +function __fish_systemctl_scopes + if type -q systemctl + if __fish_contains_opt user + # Scopes are usually generated at runtime + # Therefore show known _units_, not unit-files + systemctl --user list-units --no-legend --type=scope ^/dev/null | cut -f 1 -d ' ' + else + systemctl list-units --no-legend --type=scope ^/dev/null | cut -f 1 -d ' ' + end + end +end |