diff options
Diffstat (limited to 'share/functions/__fish_systemctl_slices.fish')
-rw-r--r-- | share/functions/__fish_systemctl_slices.fish | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/share/functions/__fish_systemctl_slices.fish b/share/functions/__fish_systemctl_slices.fish new file mode 100644 index 00000000..40628f98 --- /dev/null +++ b/share/functions/__fish_systemctl_slices.fish @@ -0,0 +1,11 @@ +function __fish_systemctl_slices + if type -q systemctl + if __fish_contains_opt user + # Slices are usually generated at runtime + # Therefore show known _units_, not unit-files + systemctl --user list-units --no-legend --type=slice ^/dev/null | cut -f 1 -d ' ' + else + systemctl list-units --no-legend --type=slice ^/dev/null | cut -f 1 -d ' ' + end + end +end |