[Bash-completion-commits] ./current r1229: Improved rpm macro completion.

Ville Skyttä ville.skytta at iki.fi
Sun Jan 11 13:09:54 UTC 2009


------------------------------------------------------------
revno: 1229
committer: Ville Skyttä <ville.skytta at iki.fi>
branch nick: current
timestamp: Sun 2009-01-11 15:09:54 +0200
message:
  Improved rpm macro completion.
modified:
  bash_completion
  debian/changelog
-------------- next part --------------
=== modified file 'bash_completion'
--- a/bash_completion	2009-01-11 12:39:47 +0000
+++ b/bash_completion	2009-01-11 13:09:54 +0000
@@ -1928,8 +1928,9 @@
 		;;
 	--eval)
 		# get a list of macros
-		COMPREPLY=( $( sed -ne 's|^\(%'${cur#\%}'[^ '$'\t'']*\).*$|\1|p' \
-			       /usr/lib/rpm/macros ) )
+		COMPREPLY=( $( rpm --showrc | sed -ne \
+		's/^-\?[0-9]\+[:=][[:space:]]\+\('${cur#%}'[^[:space:](]*\).*/\1/p' ) )
+		COMPREPLY=( "${COMPREPLY[@]/#/%}" )
 		return 0
 		;;
 	--pipe)

=== modified file 'debian/changelog'
--- a/debian/changelog	2009-01-10 19:30:12 +0000
+++ b/debian/changelog	2009-01-11 13:09:54 +0000
@@ -52,6 +52,7 @@
     (Closes: #272660)
   * Added JPEG 2000 files to display completion, thanks to Bastien Nocera
     (RHBZ: #304771)
+  * Improved rpm macro completion.
   * Merge from Gentoo:
     - fix 'find' completion so that it properly completes on -?(i)whilename.
       Patch by Ciaran McCreesh.



More information about the Bash-completion-commits mailing list