SOURCES: bash-completion-poldek.sh - options for --verify - --sn w...

glen glen at pld-linux.org
Tue Mar 6 20:57:06 CET 2007


Author: glen                         Date: Tue Mar  6 19:57:06 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- options for --verify
- --sn works now

---- Files affected:
SOURCES:
   bash-completion-poldek.sh (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SOURCES/bash-completion-poldek.sh
diff -u SOURCES/bash-completion-poldek.sh:1.4 SOURCES/bash-completion-poldek.sh:1.5
--- SOURCES/bash-completion-poldek.sh:1.4	Wed Feb  8 17:26:14 2006
+++ SOURCES/bash-completion-poldek.sh	Tue Mar  6 20:57:00 2007
@@ -10,16 +10,17 @@
 	cur=${COMP_WORDS[COMP_CWORD]}
 	prev=${COMP_WORDS[COMP_CWORD-1]}
 
-#	needs to be elsewhere otherwise mode stays to --sn ;(
-#	case "$prev" in
-#	-@(n|-sn))
-#		COMPREPLY=( $( poldek -l | awk "/^$cur/{print \$1}" ) )
-#		return 0
-#		;;
-#	esac
+	case "$prev" in
+	-@(n|-sn))
+		COMPREPLY=( $( poldek -l | awk "/^$cur/{print \$1}" ) )
+		return 0
+		;;
+	--verify)
+		COMPREPLY=( $( compgen -W 'deps conflicts file-conflicts file-orphans file-missing-deps' -- $cur ) )
+		return 0
+		;;
+	esac
 
-	if [ $COMP_CWORD -eq 1 ]; then
-		# first parameter on line
 		case "$cur" in
 		--*)
 			COMPREPLY=( $( compgen -W '
@@ -42,9 +43,6 @@
 				       -- $cur ) )
 			;;
 		esac
-
-	return 0
-	fi
 
 	case "${COMP_WORDS[1]}" in
 	-@(e|-erase))
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/bash-completion-poldek.sh?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list