From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9642 invoked by alias); 22 Mar 2014 17:38:25 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18656 Received: (qmail 21526 invoked from network); 22 Mar 2014 17:38:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140322103747.ZM9034@torch.brasslantern.com> Date: Sat, 22 Mar 2014 10:37:47 -0700 In-reply-to: <1395506625-4132-1-git-send-email-m0viefreak.cm@googlemail.com> Comments: In reply to m0viefreak "[PATCH] _git: auto-removable '..' suffix: remove at the end of lines" (Mar 22, 5:43pm) References: <532D99DE.6090503@googlemail.com> <1395506625-4132-1-git-send-email-m0viefreak.cm@googlemail.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org, m0viefreak , zsh-users@zsh.org Subject: Re: [PATCH] _git: auto-removable '..' suffix: remove at the end of lines MIME-version: 1.0 Content-type: text/plain; charset=us-ascii [> workers] On Mar 22, 5:43pm, m0viefreak wrote: } Subject: [PATCH] _git: auto-removable '..' suffix: remove at the end of li } } - compset -S '..*' || suf=( -qS .. -r '.@~ ^:' ) } + compset -S '..*' || suf=( -S .. -r '.@~ ^:\t\n\-' ) The presence or absence of \n in the -r string doesn't seem to make any difference for me. The suffix is auto-removed on accept-line whether invoked as ctrl+m or ctrl+j or enter/return, with or without \n there. And of course the \t only matters if you type ctrl+v tab, because in other cases complete-word is invoked and no character is inserted. Hmm. However, here's something really strange. Starting from zsh -f with compinit loaded and tab bound to complete-word ... With the original code: compset -S '..*' || suf=( -qS .. -r '.@~ ^:' ) the trailing ".." is not boldfaced like an autoremovable suffix is by default, and indeed it is not removed upon accept-line, though it is auto-removed by e.g. a space. With this: compset -S '..*' || suf=( -qS .. -r '.@~ ^:\-' ) (note that the only change is to add '\-' to the -r string), the ".." IS shown in boldface and is auto-removed by accept-line. I have no idea why that would make a difference.