* PATCH: complete for tmux server-access
@ 2023-11-14 20:56 Oliver Kiddle
0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2023-11-14 20:56 UTC (permalink / raw)
To: Zsh workers
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() {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-14 20:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-14 20:56 PATCH: complete for tmux server-access Oliver Kiddle
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).