Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: MPlayer completion fonction



> i don't know how to use pattern matching in order to take only
> driver of a mplayer -vo help. (how to suppress the first line ?)
> if you have an idea...

${${${(M)${(f)"$(mplayer -vo help)"}:#	*}/	/}/	/:}

Assuming they don't change the output format, this will find all
relevant lines by virtue of the beginning TAB, discard them, then replace
the second tabs with colons in case you want to use those descriptions
(and why waste free descriptions?).

All blocks of whitespace in that line should be literal TABs, by the
way.



Messages sorted by: Reverse Date, Date, Thread, Author