From: "Bart Schaefer" <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: The removal of spaces after a tab-complete
Date: Mon, 23 Dec 2002 01:28:21 +0000 [thread overview]
Message-ID: <1021223012821.ZM13386@candle.brasslantern.com> (raw)
In-Reply-To: <20021221203256.3445250b.david@eelf.ddts.net>
On Dec 21, 8:32pm, David B Harris wrote:
}
} I'm finding some irritating behaviour with zsh that I can't seem to turn
} off. Specifically, after I make a completion, then hit "|" (that's a
} pipe), zsh deletes the space that was inserted after the tab-complete.
You can't turn it off. You can only forcibly defeat it. You can either
define your own completions with auto-suffix-removal disabled, for every
situation in which you don't want this to happen; or you can re-bind the
specific keys for which, when typed after a completion, it should not
happen. The latter is probably easier:
function self-insert-no-autoremove {
LBUFFER="$LBUFFER$KEYS"
}
zle -N self-insert-no-autoremove
bindkey '|' self-insert-no-autoremove
The reasons why you can't turn it off are varied and in some instances
nearly lost in the mists of time, but it boils down to something like:
(1) it was automatically added, so it's not costing you keystrokes if
it automatically goes away again; (2) the absence of the space doesn't
matter to the syntax; (3) there are more cases where leaving the space
is wrong, than cases where removing it is wrong; so (4) if you really
want a space there, you can just type one yourself.
next prev parent reply other threads:[~2002-12-23 1:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-22 1:32 David B Harris
[not found] ` <3E052DBC.7050107@cql.com>
[not found] ` <20021222054028.282f9ef2.david@eelf.ddts.net>
[not found] ` <3E060557.7070207@cql.com>
2002-12-22 22:33 ` David B Harris
2002-12-23 0:52 ` Geoff Wing
2002-12-23 1:28 ` Bart Schaefer [this message]
2002-12-23 2:29 ` David B Harris
2002-12-23 5:34 ` Zefram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1021223012821.ZM13386@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).