Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Completion/Unix/_ffmpeg: fix crash and update for modern ffmpeg
- X-seq: zsh-workers 54833
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Cc: dana <dana@xxxxxxx>
- Subject: Re: [PATCH] Completion/Unix/_ffmpeg: fix crash and update for modern ffmpeg
- Date: Sun, 21 Jun 2026 07:51:05 +0200
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=VytjVH7IqTU0qMWBFX7yW7dRRnh9AAMGfdC4kdLh6Jw=; fh=cYAfAUXbdI96UXv7FHza4BeDFTtXyHvkA9Tti9uq580=; b=LNKh3PmNWKc9KM+GRRejLI+QwBrJOwpvzK+zC/20uHcmhmpQfK+cldCTuU0lqMYFey Hl2EOtO/RJ0+s2vWPdjsv7YFD/STUko09BkLNJ1jKWL1e8w5oF5thF4yNOFx7N0eH+Qx L3Rq80IhTWO4XTdvwlDLYlg/ah8pJQUo+Nd26HTZaWwwgAEQt5KLqPMXRlktQGkbMz0U C2ZO7QoyZFczi+cdowSCZuUTzTI48dRTZljDxK7NqRhxdj3gfCphziAOITjeeQA40IGj i7sfEEawlA1oBFbCXo0gcY3p8HAUxyh+B1tUn9Cs6dDK633tekHqkcuxWM1++vU78AQk lyOw==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1782021079; cv=none; d=google.com; s=arc-20240605; b=hcB4MY6g8dGrlUQ0CZr8daarUdbCHdx2WRW754g3UJRCQYeh8sisOi76MKmwmJTz46 21PD3s8syfPsjkRrwugpErdZNfju/FDH9fIT6dCZIGnhGjyxx62I6MqOr9jNzNh/7/ez PU7CsQU8J+l/oZfHeNL0thMpZGBJm8AmN2Kmi88lGQhqLlIpNzxBQn/6VF/ts29ZL3d1 wT87uItl1tKHI0V+3d+PFS3ATdzNFB48IGNw/Co1I9SVMcdaSMKv1KWbqmcyKt/Ak01O CM5rv5foF4yryJmd9uVkOPKfSTYJ9d8TWcCWosNfTp1JRBoknTghgOUnoYjjsLS/u+RQ SiMw==
- Archived-at: <https://zsh.org/workers/54833>
- In-reply-to: <20260621054630.9604-1-mikachu@gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <00d2013e-f7fe-4e49-aa3a-a7f318b57edb@app.fastmail.com> <20260621054630.9604-1-mikachu@gmail.com>
- [[ $x == \([' *:-']##\)* ]] && continue # skip -help etc
+ [[ $opts[x] == \([' *:-']##\)* ]] && continue # skip -help etc
On Sun, Jun 21, 2026 at 7:46 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> while LLMs aren't great at writing code, they do spot typos pretty well. There's also
> an issue with _ffmpeg_flags not handling the -t and -d options (as well as discarding
> all compadd options, they end up in $opth which is unused):
>
> % ffmpeg -disposition <tab>
> _ffmpeg_flags: bad option: -t
>
> Feel free to roll this in with your patch of course.
>
> ---
> Completion/Unix/Command/_ffmpeg | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/Completion/Unix/Command/_ffmpeg b/Completion/Unix/Command/_ffmpeg
> index e8b59e0293..a8d64b4f4e 100644
> --- a/Completion/Unix/Command/_ffmpeg
> +++ b/Completion/Unix/Command/_ffmpeg
> @@ -352,7 +352,7 @@ _ffmpeg_filters() {
> v|vid*) type=V ;;
> esac
>
> - (( ${+opt[-T]} )) || _ffmpeg_prev_ss_type type
> + (( ${+opth[-T]} )) || _ffmpeg_prev_ss_type type
>
> case $type in
> A) tag=audio-$tag desc="audio $desc" ;;
> @@ -969,7 +969,7 @@ expert_opts+=(
> '
> '-copyts[copy timestamps]'
> '-start_at_zero[shift input timestamps to start at 0 (with -copyts)]'
> - '-copytdb[specify how to set encoder time base when copying stream]:mode:((
> + '-copytb[specify how to set encoder time base when copying stream]:mode:((
> -1\:"decide automatically"
> 0\:"use decoder time base"
> 1\:"use demuxer time base"
> @@ -1196,7 +1196,7 @@ expert_opts+=(
> '*-rc_override[specify rate-control override]:rate control (beg,end,quant):'
> '*-timecode[specify timecode]:timecode (hh:mm:ss[:;.]ff)'
> '*-pass[specify pass number for two-pass video encoding]:pass:(1 2)'
> - '*-passlog[specify two-pass log-file prefix]:log-file prefix [ffmpeg2pass]:'
> + '*-passlogfile[specify two-pass log-file prefix]:log-file prefix [ffmpeg2pass]:'
> '*-intra_matrix[specify intra quantisation matrix]:intra quantisation matrix:'
> '*-inter_matrix[specify inter quantisation matrix]:inter quantisation matrix:'
> '*-chroma_intra_matrix[specify chroma intra quantisation matrix]:intra quantisation matrix:'
> @@ -1207,8 +1207,8 @@ expert_opts+=(
> '*-force_key_frames[force key frames at specified timestamps]: :_ffmpeg_kf_force_conds'
> '*-hwaccel[specify hardware acceleration for decoding]: :_ffmpeg_hwaccels'
> '*-hwaccel_device[specify hardware-acceleration device (with -hwaccel)]: :_ffmpeg_hw_devices'
> - '*-hwaccel_output_format[specify hardware-acceleration output format (with -hwaccel)]: :_ffmpeg_pixfmts -H'
> - '*-autorate[automatically rotate video]'
> + '*-hwaccel_output_format[specify hardware-acceleration output format (with -hwaccel)]: :_ffmpeg_pix_fmts -H'
> + '*-autorotate[automatically rotate video]'
> '*-autoscale[automatically scale video]'
> '*-apply_cropping[automatically crop video using specified method]:crop method [all]:((
> none\:"don'\''t apply cropping"
> --
> 2.38.1
>
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author