[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 72f2b0cb1c8cf5b22537a43762bc612d396b0675

Ville Skyttä ville.skytta at iki.fi
Wed Apr 1 20:26:13 UTC 2009


The following commit has been merged in the master branch:
commit 72f2b0cb1c8cf5b22537a43762bc612d396b0675
Author: Todd Zullinger <tmz at pobox.com>
Date:   Wed Apr 1 15:56:09 2009 -0400

    yum: Complete on filenames when $cur contains /
    
    For a long time "yum install" has accepted filenames as input and will
    do the same thing that "yum localinstall" does.  Many users no longer
    bother using localinstall and then find that they cannot complete a
    pathname with yum install.  Similarly, deplist, update, and upgrade
    accept filenames.

diff --git a/CHANGES b/CHANGES
index 1261727..2dbef89 100644
--- a/CHANGES
+++ b/CHANGES
@@ -11,6 +11,10 @@ bash-completion (1.x)
     completions.
   * Add chkconfig --override and resetpriorities completions.
 
+  [ Todd Zullinger ]
+  * Make yum complete on filenames after install, deplist, update and upgrade
+    when the following argument contains a slash.
+
  -- David Paleino <d.paleino at gmail.com>  Wed, 25 Mar 2009 23:18:24 +0100
 
 bash-completion (1.0)
diff --git a/contrib/yum b/contrib/yum
index e5af2d3..70ca365 100644
--- a/contrib/yum
+++ b/contrib/yum
@@ -43,6 +43,10 @@ _yum()
 	done
 
 	if [ -n "$special" ]; then
+		if [[ "$cur" == */* && "$special" == @(deplist|install|update|upgrade) ]]; then
+			_filedir rpm
+			return 0
+		fi
 		case $special in
 			install)
 				_yum_list available

-- 
bash-completion



More information about the Bash-completion-commits mailing list