diff options
| author | Dennis Fink | 2026-05-08 19:41:14 +0200 |
|---|---|---|
| committer | Dennis Fink | 2026-05-08 19:41:14 +0200 |
| commit | 7e73a76bba167c2a6d5bd9afc145690c5049ebf2 (patch) | |
| tree | e3d6f0596f3d7083c5b9c2141649590a2931a5d3 /transcode.sh.bash-completion | |
| parent | aea6e655e1c572c2a11c5438c57634f15649bf5e (diff) | |
| download | transcode.sh-7e73a76bba167c2a6d5bd9afc145690c5049ebf2.tar.gz transcode.sh-7e73a76bba167c2a6d5bd9afc145690c5049ebf2.zip | |
feat(cli)!: add TOML config file support
Add a structured config file so common defaults can live in one place
instead of being repeated in aliases or shell wrappers. CLI flags keep
precedence, which keeps one-off overrides predictable.
Use tomlq only when a config file is present, and fail early on missing
dependencies or invalid TOML so configuration mistakes do not silently
change encode behavior.
Move the persistent skip-codec list from the legacy skip.conf file to
[skip] codecs in config.toml. Config codecs are merged with --skip-codec
so global defaults and per-run skips can be combined.
Document the new format in the README and man page, update dependency
notes, and extend bash completion for config-file paths and the new
negative boolean flags.
BREAKING CHANGE: skip.conf is no longer read for codec skips. Migrate
its entries to [skip] codecs in config.toml and remove the old file.
BREAKING CHANGE: --encodefile and --encodefile= are replaced by
--encode-file and --encode-file=. Update scripts, aliases, and
completion usage to use the hyphenated option name.
Diffstat (limited to 'transcode.sh.bash-completion')
| -rw-r--r-- | transcode.sh.bash-completion | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/transcode.sh.bash-completion b/transcode.sh.bash-completion index ce153dd..59a9c8d 100644 --- a/transcode.sh.bash-completion +++ b/transcode.sh.bash-completion @@ -6,8 +6,8 @@ # # Each option that takes an argument is supported in all three forms: # short -f list.txt -# long space --encodefile list.txt -# long equals --encodefile=list.txt +# long space --encode-file list.txt +# long equals --encode-file=list.txt _transcode_sh() { local cur prev words cword @@ -40,7 +40,12 @@ _transcode_sh() { # This must be checked before the $prev dispatch below. # --------------------------------------------------------------------------- case "$cur" in - --encodefile=*) + --config-file=*) + cur="${cur#*=}" + _filedir + return + ;; + --encode-file=*) cur="${cur#*=}" _filedir return @@ -69,11 +74,15 @@ _transcode_sh() { # --------------------------------------------------------------------------- # Handle VALUE after short form (-f, -N, -S, -p) and - # long space form (--encodefile, --nice, --saving-file, --skip-codec, --preset). + # long space form (--encode-file, --nice, --saving-file, --skip-codec, --preset). # $prev is the option word, $cur is the value being typed. # --------------------------------------------------------------------------- case "$prev" in - -f|--encodefile) + --config-file) + _filedir + return + ;; + -f|--encode-file) _filedir return ;; @@ -106,17 +115,22 @@ _transcode_sh() { --*) local longopts=' --continue - --encodefile - --encodefile= + --no-continue + --config-file + --config-file= + --encode-file + --encode-file= --dry-run --nice --nice= --saving + --no-saving --saving-file --saving-file= --skip-codec --skip-codec= --only-if-smaller + --no-only-if-smaller --preset --preset= --help |
