From 1f9d4cbe933fd06e0a89cae6a64580bc8e576e30 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Sat, 16 Aug 2014 14:48:15 +0300 Subject: [PATCH] shell-completion: zsh: Support also --server in remote detection _set_remote() is supposed to find out if a remote server has been specified on the command line, but previously it only checked for -s and ignored --server, causing the completion code to connect to the local server instead when it should have connected to the remote server to get the data for the completions. --- shell-completion/zsh/_pulseaudio | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell-completion/zsh/_pulseaudio b/shell-completion/zsh/_pulseaudio index 243c1b4fb..6ff8ec132 100644 --- a/shell-completion/zsh/_pulseaudio +++ b/shell-completion/zsh/_pulseaudio @@ -2,9 +2,11 @@ _set_remote() { for (( i = 0; i < ${#words[@]}; i++ )) do - if [[ ${words[$i]} == -s ]]; then + if [[ ${words[$i]} == -s || ${words[$i]} == --server ]]; then remote="-s ${words[$i+1]}" break; + elif [[ ${words[$i]} == --server=* ]]; then + remote=${words[$i]} fi done }