[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 0524c838e46863c06bf254bb514628338d805ac8

Ville Skyttä ville.skytta at iki.fi
Mon Apr 13 17:37:28 UTC 2009


The following commit has been merged in the master branch:
commit 0524c838e46863c06bf254bb514628338d805ac8
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Mon Apr 13 20:37:18 2009 +0300

    mkinitrd reviewed, move to contrib.

diff --git a/CHANGES b/CHANGES
index 77ece54..69cd27d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -25,6 +25,9 @@ bash-completion (1.x)
   [ Mike Kelly ]
   * Fix _filedir on bash 4.
 
+  [ Guillaume Rousse ]
+  * Split mkinitrd completion to contrib/mkinitrd, improve it.
+
  -- David Paleino <d.paleino at gmail.com>  Wed, 25 Mar 2009 23:18:24 +0100
 
 bash-completion (1.0)
diff --git a/bash_completion b/bash_completion
index 8050eb1..6570e7c 100644
--- a/bash_completion
+++ b/bash_completion
@@ -8108,69 +8108,6 @@ _lvm()
 complete -F _lvm lvm
 }
 
-# mkinitrd(8) completion
-#
-have mkinitrd &&
-_mkinitrd()
-{
-	local cur args
-
-	COMPREPLY=()
-	cur=`_get_cword`
-	prev=${COMP_WORDS[COMP_CWORD-1]}
-
-	# --name value style option
-	case "$prev" in
-		--preload)
-			_modules
-			return 0
-			;;
-	esac
-
-	# --name=value style option
-	if [[ "$cur" == *=* ]]; then
-		prev=${cur/=*/}
-		cur=${cur/*=/}
-		case "$prev" in
-			--@(with|builtin))
-				_modules
-				return 0
-				;;
-			--@(fstab|dsdt))
-				_filedir
-				return 0
-				;;
-			--tmpdir)
-				_filedir -d
-				return 0
-				;;
-		esac
-	fi
-
-
-	if [[ "$cur" == -* ]]; then
-		COMPREPLY=( $( compgen -W '--version -v -f --preload \
-			--with= --omit-scsi-modules --omit-raid-modules \
-			--images-version --fstab= --nocompress --builtin= \
-			--nopivot --noudev --allow-missing --tmpdir= \
-			--initrdfs= --dsdt= --lvm-version= --froce-usb' \
-			-- $cur ) )
-	else
-		_count_args
-
-		case $args in
-			1)
-				_filedir
-				;;
-			2)
-				COMPREPLY=( $( command ls /lib/modules | grep "^$cur" ) )
-				;;
-		esac
-	fi
-
-} &&
-complete -F _mkinitrd mkinitrd
-
 # pkgconfig(1) completion
 #
 have pkg-config &&
diff --git a/to_review/mkinitrd b/contrib/mkinitrd
similarity index 100%
rename from to_review/mkinitrd
rename to contrib/mkinitrd

-- 
bash-completion



More information about the Bash-completion-commits mailing list