bash-completion.sh
branchv_0
changeset 23 d2ad84dcf249
parent 22 eebc16b7c3e4
child 26 a6d332fa816c
--- a/bash-completion.sh	Wed Oct 07 01:46:03 2020 +0200
+++ b/bash-completion.sh	Wed Oct 07 22:30:09 2020 +0200
@@ -17,7 +17,7 @@
 
 _relpipe_out_jack_completion_ports() {
 	if type relpipe-in-jack &> /dev/null && type relpipe-out-nullbyte &> /dev/null; then
-		relpipe-in-jack --list-jack-ports true --list-midi-messages false 2>/dev/null \
+		relpipe-in-jack --list-ports true --list-midi-messages false 2>/dev/null \
 			| relpipe-out-nullbyte \
 			| while _relpipe_out_jack_completion_read_nullbyte "name" "input" "output" "physical" "terminal" "mine" "midi" "type"; do
 				 if [[ "$midi" = "true" && "$input" = "true" && "$mine" = "false" ]]; then echo "$name"; fi; done
@@ -33,14 +33,16 @@
 	w2=${COMP_WORDS[COMP_CWORD-2]}
 	w3=${COMP_WORDS[COMP_CWORD-3]}
 
-	  if [[ "$w1" == "--jack-client-name"             && "x$w0" == "x" ]];    then COMPREPLY=("'relpipe-out-jack'")
-	elif [[ "$w1" == "--jack-connect-to-port"                          ]];    then COMPREPLY=($(compgen -W "$(_relpipe_out_jack_completion_ports)" -- "$w0"))
-	elif [[ "$w1" == "--required-jack-connections"    && "x$w0" == "x" ]];    then COMPREPLY=("1")
+	  if [[ "$w1" == "--client"                       && "x$w0" == "x" ]];    then COMPREPLY=("'relpipe-out-jack'")
+	elif [[ "$w1" == "--port"                         && "x$w0" == "x" ]];    then COMPREPLY=("'midi-out'")
+	elif [[ "$w1" == "--connect-to"                                    ]];    then COMPREPLY=($(compgen -W "$(_relpipe_out_jack_completion_ports)" -- "$w0"))
+	elif [[ "$w1" == "--required-connections"         && "x$w0" == "x" ]];    then COMPREPLY=("1")
 	else
 		OPTIONS=(
-			"--jack-client-name"
-			"--jack-connect-to-port"
-			"--required-jack-connections"
+			"--client"
+			"--port"
+			"--connect-to"
+			"--required-connections"
 		)
 		COMPREPLY=($(compgen -W "${OPTIONS[*]}" -- "$w0"))
 	fi