mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ end
|
||||||
function __fish_snap_interfaces -d 'List of interfaces'
|
function __fish_snap_interfaces -d 'List of interfaces'
|
||||||
for snap in (__fish_snap_installed_snaps)
|
for snap in (__fish_snap_installed_snaps)
|
||||||
if test $snap != core
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue