[Bash-completion-devel] mencoder profile completion

gibboris at gmail.com gibboris at gmail.com
Fri Mar 27 12:31:20 UTC 2009


Hello,

the mencoder use profile as mplayer.
But mencoder can take its profile definition from another file than
.mplayer/config which is .mplayer/mencoder.conf as stated in the man
page.
Also I'm asking if it's possible to this filename to the sed command
line 6088 of git ('-profile' entry of 'case $prev').
(It would be proper to define the filename .mplayer/$afilename according
to $cmd (mencoder profile are not usefull with mplayer and vice-versa))
Proposition, replacing :
local profiles=$(sed -ne 's|\[\(.*\)\]|\1|p' ~/.mplayer/config)
by
local aprofile = 'config'
[[ "$cmd" == 'mencoder' ]] && aprofile = 'mencoder.conf'
local profiles=$(sed -ne 's|\[\(.*\)\]|\1|p' "~/.mplayer/${aprofile}")

Regard

Raph



More information about the Bash-completion-devel mailing list