zsh-workers
 help / color / mirror / code / Atom feed
* Re: [PATCH] _git: auto-removable '..' suffix: remove at the end of lines
       [not found] ` <1395506625-4132-1-git-send-email-m0viefreak.cm@googlemail.com>
@ 2014-03-22 17:37   ` Bart Schaefer
  0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2014-03-22 17:37 UTC (permalink / raw)
  To: zsh-workers, m0viefreak, zsh-users

[> 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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-22 17:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <532D99DE.6090503@googlemail.com>
     [not found] ` <1395506625-4132-1-git-send-email-m0viefreak.cm@googlemail.com>
2014-03-22 17:37   ` [PATCH] _git: auto-removable '..' suffix: remove at the end of lines Bart Schaefer

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).