add new func for pdsh completion
This commit is contained in:
parent
b2c93eee6b
commit
931bf7e44e
1 changed files with 11 additions and 0 deletions
11
bash_completion.d/pdsh
Normal file
11
bash_completion.d/pdsh
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function _pdshgroups() {
|
||||||
|
COMPREPLY=()
|
||||||
|
local CUR KEYS
|
||||||
|
CUR="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
KEYS="$(find ~/.dsh/group/* -type f -exec basename {} \;)"
|
||||||
|
COMPREPLY=( $(compgen -W "${KEYS}" -- ${CUR}) )
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
complete -F _pdshgroups pdsh
|
Loading…
Reference in a new issue