mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 06:05:39 +08:00
Add networkctl completion
Very simple, but effective.
This commit is contained in:
parent
4d63ebde15
commit
a0b3b8ac4c
5
share/completions/networkctl.fish
Normal file
5
share/completions/networkctl.fish
Normal file
|
@ -0,0 +1,5 @@
|
|||
set -l cmds status list lldp
|
||||
|
||||
complete -c networkctl -f -n '__fish_seen_subcommand_from status' -a '(networkctl list --no-pager --no-legend -a | string trim \
|
||||
| string replace -r \'([0-9]+) (\w+) .*$\' \'$2\t$1\n$1\t$2\')'
|
||||
complete -c networkctl -x -n "not __fish_seen_subcommand_from $cmds" -a "$cmds"
|
Loading…
Reference in New Issue
Block a user