diff options
author | Frank Terbeck <ft@bewatermyfriend.org> | 2011-12-01 10:02:04 +0100 |
---|---|---|
committer | Frank Terbeck <ft@bewatermyfriend.org> | 2011-12-01 10:02:04 +0100 |
commit | d8da5ea2f2bc5f837d0b364fff2636ebdb2f90ca (patch) | |
tree | 9fd9a57486ac4702608d92088ffd91f52971244f /Completion/Unix/Command/_ffmpeg | |
parent | af2bb4fdb09414d21922d3fafe4e3a0ac1332f01 (diff) | |
parent | 9d71f4c207fb34e8d64af0443c83231b1cc3b494 (diff) | |
download | zsh-d8da5ea2f2bc5f837d0b364fff2636ebdb2f90ca.tar.gz zsh-d8da5ea2f2bc5f837d0b364fff2636ebdb2f90ca.zip |
Merge commit 'zsh-4.3.13' into debian
Diffstat (limited to 'Completion/Unix/Command/_ffmpeg')
-rw-r--r-- | Completion/Unix/Command/_ffmpeg | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_ffmpeg b/Completion/Unix/Command/_ffmpeg index 8f9b2c9cb..6a4ba234d 100644 --- a/Completion/Unix/Command/_ffmpeg +++ b/Completion/Unix/Command/_ffmpeg @@ -21,6 +21,12 @@ typeset -A opt_args _wanted ffmpeg-video-codecs expl 'force video codec (''copy'' to copy stream)' compadd -a vcodecs } +(( $+functions[_ffmpeg_scodecs] )) || _ffmpeg_scodecs() { + local scodecs + scodecs=(copy ${${(M)${(f)"$(_call_program video-codecs $words[1] -codecs 2>/dev/null)"}:#[[:space:]][D[:space:]][E[:space:]]S[S[:space:]][D[:space:]][T[:space:]][[:space:]][^[:space:]]##*}//(#b)????????([^[:space:]]##)*/$match[1]}) + _wanted ffmpeg-video-codecs expl 'force video codec (''copy'' to copy stream)' compadd -a scodecs +} + (( $+functions[_ffmpeg_formats] )) || _ffmpeg_formats() { local formats formats=(${(ou)${=${(s:,:)${${(M)${(f)"$(_call_program formats $words[1] -formats 2>/dev/null)"}:#[[:space:]][D[:space:]][E[:space:]][[:space:]][^[:space:]]##*}//(#b)????([^[:space:]]##)*/$match[1]}}}}) @@ -84,6 +90,7 @@ typeset -A _ffmpeg_flags lastopt+=":$lastopt_description:" if (( $#lastopt_values )); then if [[ $lastopt_type == flags ]]; then + lastopt="*$lastopt" flagtype=${${lastopt%%:*}#-} lastopt+="->$flagtype" _ffmpeg_flags[$flagtype]="${lastopt_values[*]}" @@ -125,6 +132,7 @@ local -a _ffmpeg_argspecs lastopt+=":$lastopt_description:_files" elif [[ $lastopt == -[asv]pre ]]; then lastopt_takesargs=0 + lastopt="*$lastopt" lastopt+=": :_ffmpeg_presets" elif [[ $lastopt == -acodec ]]; then lastopt_takesargs=0 @@ -132,11 +140,16 @@ local -a _ffmpeg_argspecs elif [[ $lastopt == -vcodec ]]; then lastopt_takesargs=0 lastopt+=": :_ffmpeg_vcodecs" + elif [[ $lastopt == -scodec ]]; then + lastopt_takesargs=0 + lastopt+=": :_ffmpeg_scodecs" elif [[ $lastopt == -f ]]; then lastopt_takesargs=0 + lastopt="*$lastopt" lastopt+=": :_ffmpeg_formats" elif [[ $lastopt == -pix_fmt ]]; then lastopt_takesargs=0 + lastopt="*$lastopt" lastopt+=": :_ffmpeg_pix_fmts" elif [[ $example == bitstream_filter ]]; then lastopt_takesargs=0 |