diff options
author | 2014-02-22 16:15:25 +0100 | |
---|---|---|
committer | 2014-02-22 16:15:25 +0100 | |
commit | 6e4f6bda0b41e9b4cf554c6d06db0ad3cb85ba12 (patch) | |
tree | 3c97f4da34bb8a7b3e81b375033a6168094d5548 /files | |
parent | Merge branch 'feature/websync-pbar' (diff) | |
download | R_overlay-6e4f6bda0b41e9b4cf554c6d06db0ad3cb85ba12.tar.gz R_overlay-6e4f6bda0b41e9b4cf554c6d06db0ad3cb85ba12.tar.bz2 R_overlay-6e4f6bda0b41e9b4cf554c6d06db0ad3cb85ba12.zip |
add bash completion for roverlay-query-config
Diffstat (limited to 'files')
-rw-r--r-- | files/misc/roverlay.bashcomp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/files/misc/roverlay.bashcomp b/files/misc/roverlay.bashcomp index 60a49e6..c15dd96 100644 --- a/files/misc/roverlay.bashcomp +++ b/files/misc/roverlay.bashcomp @@ -306,3 +306,35 @@ _roverlay_setup_comp() { esac } complete -F _roverlay_setup_comp roverlay-setup + +_roverlay_query_config_comp() { + local cur + local prev + + COMPREPLY=() + _get_comp_words_by_ref cur prev + + local LONGOPTS=( + '--help' '--config-file' '--all' '--list-all' + '--empty-missing' '--from-file' '--outfile' '--variable' + ) + local SHORTOPTS=( + '-h' '-C' '-a' '-l' '-u' '-f' '-O' '-v' + ) + + case "${prev}" in + '-C'|'--config-file'|'-f'|'--from-file'|'-O'|'--outfile') + # <file> arg + _filedir + ;; + '-v'|'--variable') + true + ;; + *) + COMPREPLY=( + $( compgen -W "${LONGOPTS[*]} ${SHORTOPTS[*]}" -- "${cur}" ) + ) + ;; + esac +} +complete -F _roverlay_query_config_comp roverlay-query-config |