bash_completion: switch nitg and nitc
authorJean Privat <jean@pryen.org>
Thu, 11 Dec 2014 03:39:22 +0000 (22:39 -0500)
committerJean Privat <jean@pryen.org>
Thu, 11 Dec 2014 14:18:27 +0000 (09:18 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

misc/bash_completion/nit

index 6d464ec..fa48b79 100644 (file)
@@ -27,10 +27,10 @@ _nit_lazy() {
        # and setup a new `complete` for the command
        eval "$($1 --bash-completion)"
 
-       # Special case for `nitc` that uses the completion of `nitg`
-       if test "$cmd" = "nitc"; then
-               cmd=nitg
-               complete -F _nitg -o default nitc
+       # Special case for `nitg` that uses the completion of `nitc`
+       if test "$cmd" = "nitg"; then
+               cmd=nitc
+               complete -F _nitc -o default nitg
        fi
 
        if [[ $(type -t _$cmd) == function ]]; then