From dfd7870697ffce9b548711bbe727667d30e128ec Mon Sep 17 00:00:00 2001 From: exploide Date: Tue, 3 Mar 2020 19:20:15 +0100 Subject: [PATCH] improved fish shell completion --- data/fish-completion/fwupdmgr.fish | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data/fish-completion/fwupdmgr.fish b/data/fish-completion/fwupdmgr.fish index 2c1007b6b..eed3ce6e8 100644 --- a/data/fish-completion/fwupdmgr.fish +++ b/data/fish-completion/fwupdmgr.fish @@ -1,5 +1,9 @@ function __fish_fwupdmgr_devices --description 'Get device IDs used by fwupdmgr' - fwupdmgr get-devices | string replace -f -r '.*Device ID:\s*(.*)' '$1' + set -l ids (fwupdmgr get-devices | string replace -f -r '.*Device ID:\s*(.*)' '$1') + set -l names (fwupdmgr get-devices | string replace -f -r '.*─(.*):$' '$1') + for i in (seq (count $ids)) + echo -e "$ids[$i]\t$names[$i]" + end end function __fish_fwupdmgr_remotes --description 'Get remote IDs used by fwupdmgr'