Initial commit.
This commit is contained in:
15
bash/completion/watchman
Normal file
15
bash/completion/watchman
Normal file
@@ -0,0 +1,15 @@
|
||||
_service_module() {
|
||||
local cur
|
||||
|
||||
COMPREPLY=()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
|
||||
if [[ "$UID" == '0' ]]; then
|
||||
IFS=$'\n' words=( /etc/rc.d/* )
|
||||
else
|
||||
IFS=$'\n' words=( $HOME/.watchman/init.d/* )
|
||||
fi
|
||||
|
||||
COMPREPLY=( $(compgen -W "${words[*]##*/}" -- "$cur") )
|
||||
}
|
||||
complete -F _service_module service watchman
|
||||
Reference in New Issue
Block a user