Move __fish_complete_lsusb into the completion script

This commit is contained in:
Jason 2019-11-30 20:24:10 +09:00 committed by Fabian Homborg
parent b3291619f4
commit 6245d76e57
2 changed files with 4 additions and 3 deletions

View File

@ -1,3 +1,7 @@
function __fish_complete_lsusb
lsusb | awk -F[ :] '{ print $2 ":" $4 }'
end
complete -c lsusb -s v -l verbose -d "Increase verbosity (show descriptors)"
complete -x -c lsusb -s s -a '(__fish_complete_lsusb)' -d "Show only devices with specified device and/or bus numbers (in decimal)"
complete -c lsusb -s d -d "Show only devices with the specified vendor and product ID numbers (in hexadecimal)"

View File

@ -1,3 +0,0 @@
function __fish_complete_lsusb
lsusb | awk -F[ :] '{ print $2 ":" $4 }'
end