[pulseaudio-discuss] [PATCH 1/2] shell-completion: zsh: Mark a variable as local

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Sat Oct 18 11:10:40 PDT 2014


Variables are global by default, and we certainly don't want
_pactl_commands to be a global variable.
---
 shell-completion/zsh/_pulseaudio | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/shell-completion/zsh/_pulseaudio b/shell-completion/zsh/_pulseaudio
index 1c786dc..5f66ed9 100644
--- a/shell-completion/zsh/_pulseaudio
+++ b/shell-completion/zsh/_pulseaudio
@@ -229,6 +229,8 @@ _pactl_completion() {
     _set_remote
 
     _pactl_command(){
+        local -a _pactl_commands
+
         _pactl_commands=(
             'help: show help and exit'
             'stat: dump statistics about the PulseAudio daemon'
-- 
1.9.3



More information about the pulseaudio-discuss mailing list