diff options
| author | Dennis Fink | 2026-05-10 20:37:01 +0200 |
|---|---|---|
| committer | Dennis Fink | 2026-05-10 20:37:01 +0200 |
| commit | eecaf6c4b9b5c6c248302e7db2bb15b7ca1c6b29 (patch) | |
| tree | 3e2d461decedce7e61a9dd5beffb0ba93ce99ba1 /transcode.sh.bash-completion | |
| parent | 46e56972f2b4d16ca6b3fd04611f86cf8580ea10 (diff) | |
| download | transcode.sh-eecaf6c4b9b5c6c248302e7db2bb15b7ca1c6b29.tar.gz transcode.sh-eecaf6c4b9b5c6c248302e7db2bb15b7ca1c6b29.zip | |
feat(preset): add --list-presets to enumerate available presets
Print all *.sh files found in $PRESET_DIR, one per line, with a one-line
description extracted from the first line of each file if it matches a
`# description: …` comment. Presets without such a comment are listed
without a description.
Symlinks pointing to another preset inside $PRESET_DIR are shown as
"<name> - Symlinked to <target>" rather than duplicating the
description. Symlinks pointing outside $PRESET_DIR are followed and
treated as regular preset files.
Column width for preset names is calculated from the longest name in the
directory so descriptions align with minimal padding.
Also extracts the repeated readlink/realpath idiom into a dedicated
resolve_path() helper and adds a doc comment to filesize().
Exits immediately after printing (same pattern as --version/--help).
Honours --quiet/NO_COLOR via the existing msg() and color
infrastructure.
Diffstat (limited to '')
| -rw-r--r-- | transcode.sh.bash-completion | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/transcode.sh.bash-completion b/transcode.sh.bash-completion index 1cae90e..2749882 100644 --- a/transcode.sh.bash-completion +++ b/transcode.sh.bash-completion @@ -138,6 +138,7 @@ _transcode_sh() { --help --hwaccel --hwaccel= + --list-presets --nice --nice= --no-color |
