myshellconfig/bash_completion.d/pdsh

12 lines
269 B
Text
Raw Normal View History

2020-01-15 13:53:20 +01:00
#!/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