From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14159 invoked from network); 14 Nov 2023 20:57:00 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 14 Nov 2023 20:57:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:From:Reply-To:Cc: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=DRj+hAcuk1cimrweg9vuzg5buWHU62khaIWBeZ6K9M4=; b=W8KPvHG/Ei62RrKPLE8Bju0hy8 QxvA48eDdwqMfay1UpeTD84YtWg2t+a3Y2LNFrIVrf4zj+B/hu8edPqaU9i0qhBUwNiMVOu7US1YC 4sPqo9RO0kj4RhWMbf+K9qzuOLv8uc2i+HElJDHijlwjscuOShgKK5oKrXiERd2eLqASqVPDyjTE4 LdbdbNSouHPLpejF/0hoWKFowHmvO/cmopshLOs/BeM0S9Tr3lBdCtuO2aWNRgmihPQv96Yk9LJtE TN5ktN+Rc83zG8KqVdvySImA5ca4artsc48rC7vBy7V6+WyG0d/4CXcShg7Ouj0fiji8nXiAJamdt QdVs0kGA==; Received: by zero.zsh.org with local id 1r30Su-000Ei5-QN; Tue, 14 Nov 2023 20:56:56 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1r30SI-000EPy-MT; Tue, 14 Nov 2023 20:56:19 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.95) (envelope-from ) id 1r30SG-000OPU-RL for zsh-workers@zsh.org; Tue, 14 Nov 2023 21:56:16 +0100 From: Oliver Kiddle To: Zsh workers Subject: PATCH: complete for tmux server-access MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <93834.1699995376.1@hydra> Date: Tue, 14 Nov 2023 21:56:16 +0100 Message-ID: <93835-1699995376.788561@1L69.ftlF.k7Ez> X-Seq: 52302 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: 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() {