summaryrefslogtreecommitdiff
path: root/transcode.sh.bash-completion
diff options
context:
space:
mode:
authorDennis Fink2026-05-22 22:12:09 +0200
committerDennis Fink2026-05-22 22:12:09 +0200
commite6df883f8bb16e24705db1937a0d1d62cef4ae9d (patch)
tree377b53e3dcfbd6ce607682b17291bd9d931f443c /transcode.sh.bash-completion
parentb06aac7607cabd5b192cc37b357c75e933f6ed13 (diff)
downloadtranscode.sh-e6df883f8bb16e24705db1937a0d1d62cef4ae9d.tar.gz
transcode.sh-e6df883f8bb16e24705db1937a0d1d62cef4ae9d.zip
fix(completion): complete long option values
Initialize bash completion with -n = so --option=value forms keep the equals sign as part of the current word. This fixes completion for long options that take values with equals syntax, where pressing Tab after --option= previously failed to offer value completions. Update the manual sourcing hint to match the renamed .sh completion file.
Diffstat (limited to '')
-rw-r--r--transcode.sh.bash-completion.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/transcode.sh.bash-completion.sh b/transcode.sh.bash-completion.sh
index c980081..8796373 100644
--- a/transcode.sh.bash-completion.sh
+++ b/transcode.sh.bash-completion.sh
@@ -6,7 +6,7 @@
# Install to:
# /etc/bash_completion.d/transcode.sh
# or source manually:
-# source transcode.sh.bash-completion
+# source transcode.sh.bash-completion.sh
#
# Each option that takes an argument is supported in all three forms:
# short -f list.txt
@@ -14,8 +14,8 @@
# long equals --encode-file=list.txt
_transcode_sh() {
- local cur prev words cword
- _init_completion || return
+ local cur prev
+ _init_completion -n = || return
local -r preset_dir="${XDG_CONFIG_HOME:-$HOME/.config}/transcode.sh/presets"