completion
This commit is contained in:
parent
40f8ea1541
commit
5f8e60e03a
14
bin/dcom
14
bin/dcom
@ -61,3 +61,17 @@ dcom() {
|
||||
unset $(grep -v '^#' "$SYSTEM_ENV_FILE" | sed -E 's/(.*)=.*/\1/' | xargs)
|
||||
fi
|
||||
}
|
||||
|
||||
_dcom_completion() {
|
||||
local SYSTEMS_CONFIG="$ENV_DIR/.systems"
|
||||
local cur prev opts
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
opts="$(awk '{print $1}' $SYSTEMS_CONFIG | paste -sd' ' -)"
|
||||
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
}
|
||||
|
||||
complete -F _dcom_completion dcom
|
||||
14
bin/drun
14
bin/drun
@ -74,3 +74,17 @@ drun() {
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
_drun_completion() {
|
||||
local SYSTEMS_CONFIG="$ENV_DIR/.systems"
|
||||
local cur prev opts
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
opts="$(awk '{print $1}' $SYSTEMS_CONFIG | paste -sd' ' -)"
|
||||
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
}
|
||||
|
||||
complete -F _drun_completion drun
|
||||
Loading…
Reference in New Issue
Block a user