[Bash-completion-commits] ./current r1322: Added net-tools (mii-tool and mii-diag) completions

David Paleino d.paleino at gmail.com
Thu Feb 5 08:48:44 UTC 2009


------------------------------------------------------------
revno: 1322
committer: David Paleino <d.paleino at gmail.com>
branch nick: current
timestamp: Thu 2009-02-05 09:48:44 +0100
message:
  Added net-tools (mii-tool and mii-diag) completions
renamed:
  to_review/net-tools => contrib/net-tools
modified:
  debian/changelog
  contrib/net-tools
-------------- next part --------------
=== renamed file 'to_review/net-tools' => 'contrib/net-tools'
--- a/to_review/net-tools	2009-01-19 21:01:14 +0000
+++ b/contrib/net-tools	2009-02-05 08:48:44 +0000
@@ -9,15 +9,20 @@
 	local cur prev
 
 	COMPREPLY=()
-	cur=${COMP_WORDS[COMP_CWORD]}
+	cur=`_get_cword`
 	prev=${COMP_WORDS[COMP_CWORD-1]}
 
 	# --name value style option
 	case $prev in
-		-@(F|A))
+		-F)
 			COMPREPLY=( $( compgen -W '100baseTx-FD 100baseTx-HD \
 				10baseT-FD 10baseT-HD' -- $cur ) )
-				return 0
+			return 0
+			;;
+		-A)
+			COMPREPLY=( $( compgen -W '100baseT4 100baseTx-FD 100baseTx-HD \
+				10baseT-FD 10baseT-HD' -- $cur ) )
+			return 0
 			;;
 	esac
 
@@ -27,7 +32,13 @@
 		prev=${cur/=*/}
 		cur=${cur/*=/}
 		case "$prev" in
-			--@(force|advertise))
+			--force)
+				COMPREPLY=( $( compgen -W '100baseTx-FD \
+					100baseTx-HD 10baseT-FD \
+					10baseT-HD' -- $cur ) )
+				return 0
+				;;
+			--advertise)
 				COMPREPLY=( $( compgen -W '100baseT4 \
 					100baseTx-FD 100baseTx-HD 10baseT-FD \
 					10baseT-HD' -- $cur ) )
@@ -52,7 +63,7 @@
 	local cur prev
 
 	COMPREPLY=()
-	cur=${COMP_WORDS[COMP_CWORD]}
+	cur=`_get_cword`
 	prev=${COMP_WORDS[COMP_CWORD-1]}
 
 	# --name value style option
@@ -70,7 +81,7 @@
 			--all-interfaces -s --status -D --debug -g \
 			--read-parameters -G --set-parameters -M  --msg-level \
 			-p --phy -r  --restart -R  --reset -v -V -w --watch \
-			-?' -- $cur ) )
+			-? --help' -- $cur ) )
 	else
 		_available_interfaces -a
 	fi

=== modified file 'debian/changelog'
--- a/debian/changelog	2009-02-04 23:28:08 +0000
+++ b/debian/changelog	2009-02-05 08:48:44 +0000
@@ -7,6 +7,7 @@
   * Added brctl completion
   * Added cpan2dist completion
   * Added qemu completion
+  * Added net-tools (mii-tool and mii-diag) completions
 
   [ David Paleino ]
   * Added .kar to Timidity completion.
@@ -126,7 +127,7 @@
   * Prevent completion dir from being sourced twice if
     BASH_COMPLETION_DIR and BASH_COMPLETION_COMPAT_DIR are equal (Alioth#311433) 
 
- -- David Paleino <d.paleino at gmail.com>  Thu, 05 Feb 2009 00:27:02 +0100
+ -- David Paleino <d.paleino at gmail.com>  Thu, 05 Feb 2009 09:48:08 +0100
 
 bash-completion (20080705) unstable; urgency=low
 



More information about the Bash-completion-commits mailing list