From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Bang-four (Re: "{ } always { }" construct and return in called functions)
Date: Fri, 29 May 2015 17:31:51 -0700 [thread overview]
Message-ID: <150529173151.ZM15506@torch.brasslantern.com> (raw)
In-Reply-To: <1B167C36-5FB1-4856-8D73-F8EF6836B177@yost.com>
On May 26, 7:20pm, Dave Yost wrote:
}
} By accident I often type !4 and then tab
} instead of !$ and then tab.
} When I backspace over the !4 and type !$, the !$ seems to be invisible, i.e. doesn't work.
This happens because when !4 is expanded, it sets the current history event
to 4. Then when you expand !$, it tries to grab the last word of event #4.
If your shell has been running long enough that event #4 has fallen out of
the history, there is no last word of that event to expand.
This has always bothered me a bit -- it sort of makes sense that when you
type out a command line containing !4 !$ and hit enter, you get the same
history event for both references, but when expanding one at a time with
ZLE's expand-word that makes much less sense. On the other hand if you
tab-expand the entire line at once, you do want the same behavior as if
you hit enter.
Anyway you can make all of this sane with "setopt CSH_JUNKIE_HISTORY".
next prev parent reply other threads:[~2015-05-30 0:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAHfspHmUOgLjnEMtLBBoeU31Z2GKu8uD5MYE4jsogMKbf+ag9g@mail.gmail.com>
[not found] ` <20150513155915.71f3daaa@pwslap01u.europe.root.pri>
2015-05-18 11:38 ` "{ } always { }" construct and return in called functions Mikael Magnusson
2015-05-18 12:14 ` Peter Stephenson
2015-05-18 12:24 ` Mikael Magnusson
2015-05-18 12:47 ` Peter Stephenson
2015-05-19 5:04 ` Bart Schaefer
2015-05-19 6:22 ` Mikael Magnusson
2015-05-19 6:31 ` Mikael Magnusson
2015-05-20 17:31 ` Bart Schaefer
2015-05-22 22:31 ` Peter Stephenson
2015-05-22 22:46 ` Bart Schaefer
2015-05-23 10:49 ` Daniel Shahaf
2015-05-23 15:13 ` Mikael Magnusson
2015-05-27 2:20 ` Dave Yost
2015-05-30 0:31 ` Bart Schaefer [this message]
2015-05-23 22:32 ` Release blocker (was: Re: "{ } always { }" construct and return in called functions) Daniel Hahler
2015-05-24 12:54 ` Peter Stephenson
2015-05-26 9:03 ` Peter Stephenson
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=150529173151.ZM15506@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/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).