cvs: Sort mode completions alphabetically.
This commit is contained in:
parent
6b3121b30a
commit
2fb0a3a9f6
@ -267,6 +267,15 @@ _cvs()
|
|||||||
cvsroot)
|
cvsroot)
|
||||||
_cvs_roots
|
_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)
|
editors|watchers)
|
||||||
if [[ "$cur" = -* ]]; then
|
if [[ "$cur" = -* ]]; then
|
||||||
_cvs_command_options "$1" $mode
|
_cvs_command_options "$1" $mode
|
||||||
@ -298,27 +307,6 @@ _cvs()
|
|||||||
_cvs_command_options "$1" $mode
|
_cvs_command_options "$1" $mode
|
||||||
fi
|
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)
|
import)
|
||||||
case $prev in
|
case $prev in
|
||||||
-I|-b|-m|-W)
|
-I|-b|-m|-W)
|
||||||
@ -346,6 +334,18 @@ _cvs()
|
|||||||
_cvs_command_options "$1" $mode
|
_cvs_command_options "$1" $mode
|
||||||
fi
|
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)
|
update)
|
||||||
case $prev in
|
case $prev in
|
||||||
-r|-D|-j|-I|-W)
|
-r|-D|-j|-I|-W)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user