From a0b3b8ac4c010e47197c7d4a4a9627337255707e Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 19 May 2016 14:50:25 +0200 Subject: [PATCH] Add networkctl completion Very simple, but effective. --- share/completions/networkctl.fish | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 share/completions/networkctl.fish diff --git a/share/completions/networkctl.fish b/share/completions/networkctl.fish new file mode 100644 index 000000000..370fb626c --- /dev/null +++ b/share/completions/networkctl.fish @@ -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"