mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 02:27:28 +08:00
Fallback to the slower --list-devices if device not immediately available
This commit is contained in:
parent
68a1f2b20a
commit
65dde5b55a
|
@ -1,5 +1,6 @@
|
|||
function __complete_devices
|
||||
kdeconnect-cli --shell-device-autocompletion=zsh | string replace -rf '(\w+)\[(.*)]' '$1\t$2'
|
||||
kdeconnect-cli --shell-device-autocompletion=zsh | string replace -rf -- '(\w+)\[(.*)]' '$1\t$2'
|
||||
or kdeconnect-cli --list-devices 2>/dev/null | string replace -rf -- '- (.*): (\w+) .*' '$2\t$1'
|
||||
end
|
||||
|
||||
complete -c kdeconnect-cli -s l -l list-devices -d "List all devices"
|
||||
|
|
Loading…
Reference in New Issue
Block a user