Zsh Mailing List Archive
Messages sorted by:
Re: [PATCH] _git: auto-removable '..' suffix: remove at the end of lines
- X-seq: zsh-workers 32504
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx, m0viefreak <m0viefreak.cm@xxxxxxxxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: [PATCH] _git: auto-removable '..' suffix: remove at the end of lines
- Date: Sat, 22 Mar 2014 10:37:47 -0700
- In-reply-to: <email@example.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <532D99DE.firstname.lastname@example.org> <email@example.com>
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.
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.
Messages sorted by: