From eecaf6c4b9b5c6c248302e7db2bb15b7ca1c6b29 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sun, 10 May 2026 20:37:01 +0200 Subject: 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 " - Symlinked to " 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. --- transcode.sh.bash-completion | 1 + 1 file changed, 1 insertion(+) (limited to 'transcode.sh.bash-completion') 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 -- cgit v1.3.1