zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: [PATCH 2/2] _tmux: show-environment, set-environment: Make -g,-t mutually exclusive.
Date: Thu, 17 Aug 2017 04:19:11 +0000	[thread overview]
Message-ID: <20170817041911.9623-2-danielsh@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <20170817041911.9623-1-danielsh@tarpaulin.shahaf.local2>

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() {


      reply	other threads:[~2017-08-17  4:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-17  4:19 [PATCH 1/2] _tmux: Complete option names for show-options and show-window-options Daniel Shahaf
2017-08-17  4:19 ` Daniel Shahaf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170817041911.9623-2-danielsh@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).