--- a/bash-completion.sh Thu Oct 08 16:45:50 2020 +0200
+++ b/bash-completion.sh Thu Oct 08 17:23:07 2020 +0200
@@ -20,7 +20,7 @@
relpipe-in-jack --list-ports true --list-midi-messages false 2>/dev/null \
| relpipe-out-nullbyte \
| while _relpipe_in_jack_completion_read_nullbyte "name" "input" "output" "physical" "terminal" "mine" "midi" "type"; do
- if [[ "$midi" = "true" && "$output" = "true" && "$mine" = "false" ]]; then echo "$name"; fi; done
+ if [[ "$midi" = "true" && "${!1}" = "true" && "$mine" = "false" ]]; then echo "$name"; fi; done
fi
}
@@ -40,7 +40,11 @@
if [[ "$w1" == "--client" && "x$w0" == "x" ]]; then COMPREPLY=("'relpipe-in-jack'")
elif [[ "$w1" == "--port" && "x$w0" == "x" ]]; then COMPREPLY=("'midi-in'")
- elif [[ "$w1" == "--connect-to" ]]; then COMPREPLY=($(compgen -W "$(_relpipe_in_jack_completion_ports)" -- "$w0"))
+ elif [[ "$w1" == "--connect-to" ]]; then COMPREPLY=($(compgen -W "$(_relpipe_in_jack_completion_ports output)" -- "$w0"))
+ elif [[ "$w1" == "--connect-ports" ]]; then COMPREPLY=($(compgen -W "$(_relpipe_in_jack_completion_ports output)" -- "$w0"))
+ elif [[ "$w2" == "--connect-ports" ]]; then COMPREPLY=($(compgen -W "$(_relpipe_in_jack_completion_ports input)" -- "$w0"))
+ elif [[ "$w1" == "--disconnect-ports" ]]; then COMPREPLY=($(compgen -W "$(_relpipe_in_jack_completion_ports output)" -- "$w0"))
+ elif [[ "$w2" == "--disconnect-ports" ]]; then COMPREPLY=($(compgen -W "$(_relpipe_in_jack_completion_ports input)" -- "$w0"))
elif [[ "$w1" == "--required-connections" && "x$w0" == "x" ]]; then COMPREPLY=("0")
elif [[ "$w1" == "--list-ports" ]]; then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
elif [[ "$w1" == "--list-connections" ]]; then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
@@ -50,6 +54,8 @@
"--client"
"--port"
"--connect-to"
+ "--connect-ports"
+ "--disconnect-ports"
"--required-connections"
"--list-ports"
"--list-connections"