Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
Add log level to bash completion
Browse files Browse the repository at this point in the history
  • Loading branch information
binwiederhier committed Sep 6, 2014
1 parent d47e82d commit 4f3984f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion gradle/bash/syncany.bash-completion
Expand Up @@ -67,8 +67,20 @@ _sy() {
-d --debug\
-h --help\
-v -vv\
--log\
--loglevel\
--print"

GLOBAL_LOGLEVELS="\
OFF\
SEVERE\
WARNING\
INFO\
FINE\
FINER\
FINEST\
ALL"

CONNECT_OPTIONS="\
-P --plugin\
-o --plugin-option\
Expand Down Expand Up @@ -353,7 +365,7 @@ _sy() {

*)
case "${prev}" in
--localdir|-l)
--log|--localdir|-l)
# Special handling: return directories, no space at the end

compopt -o nospace
Expand All @@ -362,6 +374,10 @@ _sy() {
return 0
;;

--loglevel)
complete_words="$GLOBAL_LOGLEVELS"
;;

*)
complete_words="$GLOBAL_COMMANDS"
complete_options="$GLOBAL_OPTIONS"
Expand Down

0 comments on commit 4f3984f

Please sign in to comment.