[Bash-completion-devel] mencoder profile completion

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


On Friday 27 March 2009, gibboris at gmail.com wrote:
> 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}")

Done in git, thanks for the suggestion.



More information about the Bash-completion-devel mailing list