mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
add initial bash_completion script
This commit is contained in:
parent
b497cffb1d
commit
d2b8f51a07
14
bash_completion.d/trezorctl.sh
Normal file
14
bash_completion.d/trezorctl.sh
Normal file
@ -0,0 +1,14 @@
|
||||
_trezorctl()
|
||||
{
|
||||
local cur prev cmds base
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
|
||||
cmds=$(trezorctl --help | grep -A 1 'Available commands:' | tail -n 1 | tr '{},' ' ')
|
||||
|
||||
COMPREPLY=($(compgen -W "${cmds}" -- ${cur}))
|
||||
return 0
|
||||
}
|
||||
|
||||
complete -F _trezorctl trezorctl
|
Loading…
Reference in New Issue
Block a user