diff options
author | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2014-08-16 14:48:15 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2014-08-17 09:20:51 +0300 |
commit | 1f9d4cbe933fd06e0a89cae6a64580bc8e576e30 (patch) | |
tree | e3d6f631f510c98e660723b707eceeafef1aad79 | |
parent | 09e9d13e2d5f42cdb3118eab93fb9d24fabdfc72 (diff) |
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.
-rw-r--r-- | shell-completion/zsh/_pulseaudio | 4 |
1 files changed, 3 insertions, 1 deletions
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 } |