[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-324-g2fb0a3a

Ville Skyttä ville.skytta at iki.fi
Tue May 24 20:32:51 UTC 2011


The following commit has been merged in the master branch:
commit 2fb0a3a9f6e26008855c18bb04bc8b55c4e09438
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Tue May 24 23:31:46 2011 +0300

    cvs: Sort mode completions alphabetically.

diff --git a/completions/cvs b/completions/cvs
index f948a85..05a7c7e 100644
--- a/completions/cvs
+++ b/completions/cvs
@@ -267,6 +267,15 @@ _cvs()
         cvsroot)
             _cvs_roots
             ;;
+        diff)
+            if [[ "$cur" == -* ]]; then
+                _cvs_command_options "$1" $mode
+                [[ $COMPREPLY == *= ]] && compopt -o nospace
+            else
+                _cvs_entries
+                COMPREPLY=( $( compgen -W '${entries[@]:-}' -- "$cur" ) )
+            fi
+            ;;
         editors|watchers)
             if [[ "$cur" = -* ]]; then
                 _cvs_command_options "$1" $mode
@@ -298,27 +307,6 @@ _cvs()
                 _cvs_command_options "$1" $mode
             fi
             ;;
-        diff)
-            if [[ "$cur" == -* ]]; then
-                _cvs_command_options "$1" $mode
-                [[ $COMPREPLY == *= ]] && compopt -o nospace
-            else
-                _cvs_entries
-                COMPREPLY=( $( compgen -W '${entries[@]:-}' -- "$cur" ) )
-            fi
-            ;;
-        remove)
-            if [[ "$cur" != -* ]]; then
-                _cvs_entries
-                # find out what files are missing
-                for i in "${entries[@]}"; do
-                    [ ! -r "$i" ] && miss+=( $i )
-                done
-                COMPREPLY=( $( compgen -W '${miss[@]:-}' -- "$cur" ) )
-            else
-                _cvs_command_options "$1" $mode
-            fi
-            ;;
         import)
             case $prev in
                 -I|-b|-m|-W)
@@ -346,6 +334,18 @@ _cvs()
                 _cvs_command_options "$1" $mode
             fi
             ;;
+        remove)
+            if [[ "$cur" != -* ]]; then
+                _cvs_entries
+                # find out what files are missing
+                for i in "${entries[@]}"; do
+                    [ ! -r "$i" ] && miss+=( $i )
+                done
+                COMPREPLY=( $( compgen -W '${miss[@]:-}' -- "$cur" ) )
+            else
+                _cvs_command_options "$1" $mode
+            fi
+            ;;
         update)
             case $prev in
                 -r|-D|-j|-I|-W)

-- 
bash-completion



More information about the Bash-completion-commits mailing list