Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 2/2] _tmux: show-environment, set-environment: Make -g,-t mutually exclusive.



tmux does not error out on the combination, but it does ignore one of
the two when both are specified.
---
 Completion/Unix/Command/_tmux | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Completion/Unix/Command/_tmux b/Completion/Unix/Command/_tmux
index 9339d6556..0f142bb0e 100644
--- a/Completion/Unix/Command/_tmux
+++ b/Completion/Unix/Command/_tmux
@@ -733,10 +733,10 @@ _tmux-set-buffer() {
 _tmux-set-environment() {
   [[ -n ${tmux_describe} ]] && print "(un)set an environment variable" && return
   _arguments -s -A "-*" -S \
-    '-g[modify global environment]' \
+    '(-t)-g[modify global environment]' \
     '-r[remove variable before starting new processes]' \
     '-u[unset a variable]' \
-    '-t[specify target session]:target session:__tmux-sessions' \
+    '(-g)-t[specify target session]:target session:__tmux-sessions' \
     ':name' ':value'
 }
 
@@ -805,9 +805,9 @@ _tmux-show-buffer() {
 _tmux-show-environment() {
   [[ -n ${tmux_describe} ]] && print "display the environment" && return
   _arguments -s \
-    '-g[show global environment]' \
+    '(-t)-g[show global environment]' \
     '-s[format output as Bourne shell commands]' \
-    '-t+[specify target session]:target session:__tmux-sessions'
+    '(-g)-t+[specify target session]:target session:__tmux-sessions' \
 }
 
 _tmux-show-messages() {



Messages sorted by: Reverse Date, Date, Thread, Author