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

Ville Skyttä ville.skytta at iki.fi
Sat Mar 28 09:27:46 UTC 2009


The following commit has been merged in the master branch:
commit cd58fa033e2e441df74876a07e9a4e9dddb0cba3
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Mar 28 11:23:37 2009 +0200

    Get mencoder profile completions from mencoder.conf, thanks to Droz Raphaël.

diff --git a/bash_completion b/bash_completion
index 398f43f..4dab965 100644
--- a/bash_completion
+++ b/bash_completion
@@ -6085,7 +6085,9 @@ _mplayer()
 			return 0
 			;;
 		-profile)
-			local profiles=$(sed -ne 's|\[\(.*\)\]|\1|p' ~/.mplayer/config)
+			local pfile=config
+			[[ "$cmd" == 'mencoder' ]] && pfile=mencoder.conf
+			local profiles=$(sed -ne 's|\[\(.*\)\]|\1|p' ~/.mplayer/$pfile 2>/dev/null)
 			COMPREPLY=( $( compgen -W "$profiles" -- $cur))
 			return 0
 			;;
diff --git a/debian/changelog b/debian/changelog
index d100669..cb057cf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -148,6 +148,7 @@ bash-completion (1:1.0-1) UNRELEASED; urgency=low
   * Simplify bash_completion.sh, return earlier in non-applicable environments.
   * Remove obsolete --buildarch and --buildos rpm(build) completions.
   * Add rpmbuild --target completion.
+  * Get mencoder profile completions from mencoder.conf, thanks to Droz Raphaël
 
   [ Freddy Vulto ]
   * Restored `_display()' completion for `display' by removing

-- 
bash-completion



More information about the Bash-completion-commits mailing list