mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 15:18:50 +08:00
completions/snap: workaround snap interfaces deprecation notice
The `snap interfaces` command prints out a deprecation notice to stderr. This breaks the completion support for interfaces, connect and disconnect commands like so: ``` $ snap connect <TAB>error: no interfaces found error: no interfaces found ... 'snap interfaces' is deprecated; use 'snap connections'. 'snap interfaces' is deprecated; use 'snap connections'. 'snap interfaces' is deprecated; use 'snap connections'. error: no interfaces found error: no interfaces found 'snap interfaces' is deprecated; use 'snap connections'. ``` Ultimately, the snap command completion should switch to `snap connections`. However, for now try to workaround the notice by redirecting stderr. Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
This commit is contained in:
parent
991389603c
commit
47200a8abf
|
@ -65,7 +65,7 @@ end
|
|||
function __fish_snap_interfaces -d 'List of interfaces'
|
||||
for snap in (__fish_snap_installed_snaps)
|
||||
if test $snap != core
|
||||
snap interfaces $snap | string replace -r '[- ]*([^ ]*)[ ]+([^ ]+)' '$2$1' | string match -v "*Slot*"
|
||||
snap interfaces $snap 2>/dev/null | string replace -r '[- ]*([^ ]*)[ ]+([^ ]+)' '$2$1' | string match -v "*Slot*"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user