From: Oliver Kiddle <opk@zsh.org>
To: Zsh workers <zsh-workers@zsh.org>
Subject: PATCH: complete for tmux server-access
Date: Tue, 14 Nov 2023 21:56:16 +0100 [thread overview]
Message-ID: <93835-1699995376.788561@1L69.ftlF.k7Ez> (raw)
I just applied github PR #106 for tmux completion. That removed the
server-info subcommand and added server-access. However the remaining
comment, description and (lack of) completion didn't look right for
server-access. So this patch handles server-access properly and a few
other new options, Although I'm using tmux 3.3a rather than the latest
snapshot which is what the github contributor appears to be using.
Oliver
diff --git a/Completion/Unix/Command/_tmux b/Completion/Unix/Command/_tmux
index b9c220f17..ab83944e6 100644
--- a/Completion/Unix/Command/_tmux
+++ b/Completion/Unix/Command/_tmux
@@ -282,6 +282,8 @@ _tmux-command-prompt() {
[[ -n ${tmux_describe} ]] && print "open the tmux command prompt in a client" && return
_arguments -s \
'-1[only accept one key press]' \
+ '-b[show prompt in background and wait till it is dismissed]' \
+ '-F[expand template as a format]' \
'-k[only accept one key press and translate it to a key name]' \
'-N[accept only numeric key presses]' \
'-i[execute the command every time the prompt input changes]' \
@@ -295,6 +297,7 @@ _tmux-command-prompt() {
_tmux-confirm-before() {
[[ -n ${tmux_describe} ]] && print "run a command but ask for confirmation before" && return
_arguments -s \
+ '-b[show prompt in background and wait till it is dismissed]' \
'-p+[specify prompt]:prompt string' \
'-t+[specify target client]:client:__tmux-clients' \
'*:::command:= _tmux'
@@ -393,7 +396,8 @@ _tmux-display-panes() {
_tmux-display-popup() {
[[ -n ${tmux_describe} ]] && print "display a popup box over a pane" && return
_arguments -s \
- "-B[don't surround the popup by a border]" \
+ "(-b)-B[don't surround the popup by a border]" \
+ '(-B)-b[set type of border line for the popup]:border type:(single rounded double heavy simple padded none)' \
'-C[close any popup on the client]' \
'-c+[specify target client]:client:__tmux-clients' \
'-d+[specify working directory for the command]:directory:_directories' \
@@ -876,13 +880,15 @@ _tmux-send-prefix() {
'-t+[specify target pane]:pane:__tmux-panes'
}
-# NOTE: this is actually an alias for "show-messages -JT", but until the
-# aliasmap system in check-tmux-state can properly handle aliases which are
-# more complex than a single word, it's best to leave this here.
-
_tmux-server-access() {
- [[ -n ${tmux_describe} ]] && print "show server information" && return
- __tmux-nothing-else
+ [[ -n ${tmux_describe} ]] && print "change access permissions of user" && return
+ _arguments -s \
+ '(-l -d)-a[grant access]' \
+ '(-l -a)-d[revoke access and detach clients]' \
+ '(-l -w)-r[read-only]' \
+ '(-l -r)-w[writable]' \
+ '(-a -d -r -w)-l[list current permissions]' \
+ ':user:_users'
}
_tmux-set-buffer() {
reply other threads:[~2023-11-14 20:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=93835-1699995376.788561@1L69.ftlF.k7Ez \
--to=opk@zsh.org \
--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).