diff options
Diffstat (limited to '')
| -rw-r--r-- | transcode.sh.bash-completion.sh | 119 |
1 files changed, 60 insertions, 59 deletions
diff --git a/transcode.sh.bash-completion.sh b/transcode.sh.bash-completion.sh index 2ae59d0..6e55970 100644 --- a/transcode.sh.bash-completion.sh +++ b/transcode.sh.bash-completion.sh @@ -52,19 +52,14 @@ function _transcode_sh() { _filedir return ;; - --backup-dir=*) - cur="${cur#*=}" - _filedir -d - return - ;; --encode-file=*) cur="${cur#*=}" _filedir return ;; - --size-report-file=*) + --preset=*) cur="${cur#*=}" - _filedir + COMPREPLY=($(compgen -W "$(_transcode_presets)" -- "$cur")) return ;; --nice=*) @@ -72,19 +67,29 @@ function _transcode_sh() { COMPREPLY=($(compgen -W "$nice_vals" -- "$cur")) return ;; + --hwaccel=*) + cur="${cur#*=}" + COMPREPLY=($(compgen -W "$hwaccel_methods" -- "$cur")) + return + ;; + --video-stream=*) + cur="${cur#*=}" + COMPREPLY=($(compgen -W "$video_streams" -- "$cur")) + return + ;; --skip-codec=*) cur="${cur#*=}" COMPREPLY=($(compgen -W "$codecs" -- "$cur")) return ;; - --preset=*) + --backup-dir=*) cur="${cur#*=}" - COMPREPLY=($(compgen -W "$(_transcode_presets)" -- "$cur")) + _filedir -d return ;; - --hwaccel=*) + --size-report-file=*) cur="${cur#*=}" - COMPREPLY=($(compgen -W "$hwaccel_methods" -- "$cur")) + _filedir return ;; --ffmpeg-loglevel=*) @@ -92,16 +97,11 @@ function _transcode_sh() { COMPREPLY=($(compgen -W "$ffmpeg_loglevels" -- "$cur")) return ;; - --video-stream=*) - cur="${cur#*=}" - COMPREPLY=($(compgen -W "$video_streams" -- "$cur")) - return - ;; esac # --------------------------------------------------------------------------- - # Handle VALUE after short form (-f, -N, -S, -p) and - # long space form (--encode-file, --nice, --size-report-file, --skip-codec, --preset). + # Handle VALUE after short and long space forms. + # The dispatch order mirrors the help output where practical. # $prev is the option word, $cur is the value being typed. # --------------------------------------------------------------------------- case "$prev" in @@ -109,40 +109,40 @@ function _transcode_sh() { _filedir return ;; - --backup-dir) - _filedir -d - return - ;; -f | --encode-file) _filedir return ;; + -p | --preset) + COMPREPLY=($(compgen -W "$(_transcode_presets)" -- "$cur")) + return + ;; -N | --nice) COMPREPLY=($(compgen -W "$nice_vals" -- "$cur")) return ;; - --size-report-file) - _filedir + --hwaccel) + COMPREPLY=($(compgen -W "$hwaccel_methods" -- "$cur")) return ;; - -S | --skip-codec) - COMPREPLY=($(compgen -W "$codecs" -- "$cur")) + --video-stream) + COMPREPLY=($(compgen -W "$video_streams" -- "$cur")) return ;; - -p | --preset) - COMPREPLY=($(compgen -W "$(_transcode_presets)" -- "$cur")) + --ffmpeg-loglevel) + COMPREPLY=($(compgen -W "$ffmpeg_loglevels" -- "$cur")) return ;; - --hwaccel) - COMPREPLY=($(compgen -W "$hwaccel_methods" -- "$cur")) + -S | --skip-codec) + COMPREPLY=($(compgen -W "$codecs" -- "$cur")) return ;; - --ffmpeg-loglevel) - COMPREPLY=($(compgen -W "$ffmpeg_loglevels" -- "$cur")) + --backup-dir) + _filedir -d return ;; - --video-stream) - COMPREPLY=($(compgen -W "$video_streams" -- "$cur")) + --size-report-file) + _filedir return ;; esac @@ -157,44 +157,45 @@ function _transcode_sh() { case "$cur" in --*) local longopts=' - --backup-dir - --backup-dir= - --color --config-file --config-file= - --continue - --dry-run + --no-config --encode-file --encode-file= - --ffmpeg-loglevel - --ffmpeg-loglevel= - --help - --hwaccel - --hwaccel= - --list-presets + --preset + --preset= --nice --nice= - --no-color - --no-continue + --hwaccel + --hwaccel= --no-hwaccel + --video-stream + --video-stream= + --skip-codec + --skip-codec= + --skip-codec-override + --dry-run + --backup-dir + --backup-dir= + --only-if-smaller --no-only-if-smaller - --no-size-report + --verify-output --no-verify-output - --only-if-smaller - --preset - --preset= - --quiet + --continue + --no-continue --size-report + --no-size-report --size-report-file --size-report-file= - --skip-codec - --skip-codec-override - --skip-codec= + --ffmpeg-loglevel + --ffmpeg-loglevel= + --quiet --verbose - --verify-output + --color + --no-color + --help --version - --video-stream - --video-stream= + --list-presets ' COMPREPLY=($(compgen -W "$longopts" -- "$cur")) # Suppress the trailing space when the only completion ends with '=' @@ -203,7 +204,7 @@ function _transcode_sh() { return ;; -*) - local shortopts='-c -f -n -N -s -S -l -p -h -? -q -v --' + local shortopts='-f -p -N -S -n -l -c -s -q -v -h -? --' COMPREPLY=($(compgen -W "$shortopts" -- "$cur")) return ;; |
