Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Small patch for FFmpeg completion function
- X-seq: zsh-workers 29068
- From: Haakon Riiser <haakon.riiser@xxxxxxxxxx>
- To: <zsh-workers@xxxxxxx>
- Subject: Small patch for FFmpeg completion function
- Date: Tue, 26 Apr 2011 23:48:21 +0200
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
This is a patch for Completion/Unix/Command/_ffmpeg (CVS rev 1.2)
It adds the "copy" keyword as an extra completion to -acodec and
-vcodec.
--
Haakon
--- _ffmpeg 26 Apr 2011 21:36:04 -0000 1.9
+++ _ffmpeg 26 Apr 2011 21:36:17 -0000 1.10
@@ -11,27 +11,27 @@
}
_ffmpeg_presets() {
local presets
presets=(~/.ffmpeg/*.ffpreset(:t:r) "$FFMPEG_DATADIR"/*.ffpreset(:t:r))
_ffmpeg_compadd 'select preset' presets ''
}
_ffmpeg_acodecs() {
local acodecs
- acodecs=(${${(M)${(f)"$(ffmpeg -codecs 2>/dev/null)"}:#[[:space:]][D[:space:]][E[:space:]]A[S[:space:]][D[:space:]][T[:space:]][[:space:]][^[:space:]]##*}//(#b)????????([^[:space:]]##)*/$match[1]})
+ acodecs=(copy ${${(M)${(f)"$(ffmpeg -codecs 2>/dev/null)"}:#[[:space:]][D[:space:]][E[:space:]]A[S[:space:]][D[:space:]][T[:space:]][[:space:]][^[:space:]]##*}//(#b)????????([^[:space:]]##)*/$match[1]})
_ffmpeg_compadd 'force audio codec (''copy'' to copy stream)' acodecs ''
}
_ffmpeg_vcodecs() {
local vcodecs
- vcodecs=(${${(M)${(f)"$(ffmpeg -codecs 2>/dev/null)"}:#[[:space:]][D[:space:]][E[:space:]]V[S[:space:]][D[:space:]][T[:space:]][[:space:]][^[:space:]]##*}//(#b)????????([^[:space:]]##)*/$match[1]})
+ vcodecs=(copy ${${(M)${(f)"$(ffmpeg -codecs 2>/dev/null)"}:#[[:space:]][D[:space:]][E[:space:]]V[S[:space:]][D[:space:]][T[:space:]][[:space:]][^[:space:]]##*}//(#b)????????([^[:space:]]##)*/$match[1]})
_ffmpeg_compadd 'force video codec (''copy'' to copy stream)' vcodecs ''
}
_ffmpeg_formats() {
local formats
formats=(${(ou)${=${(s:,:)${${(M)${(f)"$(ffmpeg -formats 2>/dev/null)"}:#[[:space:]][D[:space:]][E[:space:]][[:space:]][^[:space:]]##*}//(#b)????([^[:space:]]##)*/$match[1]}}}})
_ffmpeg_compadd 'force format' formats ''
}
_ffmpeg_list_pix_fmts() {
Messages sorted by:
Reverse Date,
Date,
Thread,
Author