From 6c9e822ccf945f3f28aee0404cefebffeef007d2 Mon Sep 17 00:00:00 2001 From: Tilman Kranz Date: Sun, 25 May 2025 06:47:35 +0200 Subject: [PATCH] update completion --- pulseaudio-tcp.bash_completion | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pulseaudio-tcp.bash_completion b/pulseaudio-tcp.bash_completion index 8d8568a..4ee07f3 100644 --- a/pulseaudio-tcp.bash_completion +++ b/pulseaudio-tcp.bash_completion @@ -8,18 +8,24 @@ _pulseaudio_tcp_completions() { options \ word - options=( "--debug" "--help" "--no-gui" ) + options=( "--debug" "--help" "--no-gui" "--" ) commands=( "start" "stop" "status" "setup" "restart" ) cur=${COMP_WORDS[COMP_CWORD]} + more_options=true for word in "${COMP_WORDS[@]}" ; do [[ $word = "$cur" ]] && continue + [[ $word = -- ]] && more_options=false options=("${options[@]/$word}") commands=("${commands[@]/$word}") done - option_list="${options[*]}" + if "$more_options" ; then + option_list="${options[*]}" + else + option_list="" + fi printf -v command_pattern "%s|" "${commands[@]}" command_pattern="(${command_pattern%?})"