summaryrefslogtreecommitdiff
path: root/transcode.sh.bash-completion
diff options
context:
space:
mode:
authorDennis Fink2026-05-10 20:37:01 +0200
committerDennis Fink2026-05-10 20:37:01 +0200
commiteecaf6c4b9b5c6c248302e7db2bb15b7ca1c6b29 (patch)
tree3e2d461decedce7e61a9dd5beffb0ba93ce99ba1 /transcode.sh.bash-completion
parent46e56972f2b4d16ca6b3fd04611f86cf8580ea10 (diff)
downloadtranscode.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 'transcode.sh.bash-completion')
-rw-r--r--transcode.sh.bash-completion1
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