From: Peter Stephenson <pws@ifh.de>
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: History !# substitutions
Date: Thu, 30 May 1996 10:33:42 +0200 [thread overview]
Message-ID: <199605300833.KAA12028@hydra.ifh.de> (raw)
In-Reply-To: "schaefer@candle.brasslantern.com"'s message of "Wed, 29 May 1996 21:40:53 MET." <960529214056.ZM28475@candle.brasslantern.com>
schaefer@candle.brasslantern.com wrote:
> zigzag% echo foo bar !#:1 ba<TAB>
> [BEEP][cursor doesn't move]
>
> Much better, but still not perfect. I realize it probably can't expand
> to the correct word, but could it at least ignore the history error and
> continue completing stuff on the rest of the line?
I think a judicious `stophist = 1' in get_comp_string() should fix this.
At this point, any valid history expansion has been done, and the
lexrestore() will fix up the real history, so this should be pretty
harmless otherwise.
I changed the code, then found there was a bug in menu completion:
hitting tab repeatedly added an extra space each time. Then I tried
it with the old version and discovered it was there anyway. Has this
been reported and fixed while I was asleep?
% setopt menucomplete
% print zle<TAB><TAB><TAB><TAB><TAB><Ctrl-e>
produces
% print zle_misc.c _
^ cursor here.
This is something to do with the code in do_single() around line 3343 of
zle_tricky.c where something called singlec is used to determine
whether a space or slash should be added. I don't know enough about
what this does to fix it.
Here's the (probably correct, as far as patches to zle_tricky.c go
:-/) patch for ignoring previous history entries when completing.
*** Src/zle_tricky.c.hstop Thu May 30 10:18:25 1996
--- Src/zle_tricky.c Thu May 30 10:19:43 1996
***************
*** 936,941 ****
--- 936,942 ----
lexsave();
inpush(dupstrspace((char *) linptr), 0);
strinbeg();
+ stophist = 1;
pushheap();
heapalloc();
i = tt0 = cp = rd = 0;
--
Peter Stephenson <pws@ifh.de> Tel: +49 33762 77366
WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.
next prev parent reply other threads:[~1996-05-30 8:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-05-29 5:33 Bart Schaefer
1996-05-29 8:19 ` Peter Stephenson
1996-05-29 15:20 ` Peter Stephenson
1996-05-30 4:40 ` Bart Schaefer
1996-05-30 8:33 ` Peter Stephenson [this message]
1996-05-30 14:58 ` Bart Schaefer
1996-05-30 15:11 ` Zefram
1996-05-30 16:11 ` Barton E. Schaefer
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=199605300833.KAA12028@hydra.ifh.de \
--to=pws@ifh.de \
--cc=zsh-workers@math.gatech.edu \
/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).