Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
!$ changes when mistyped?
- X-seq: zsh-users 15426
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: !$ changes when mistyped?
- Date: Thu, 23 Sep 2010 16:22:31 -0400 (EDT)
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Apparently there's something different enough about my work keyboard
such that I constantly inadvertently type !4 when trying to type !$. (I
reaally oughtta bind !$ to a key, considering how frequently I use it.)
The problem, though, is that I often then hit <Tab>, so that I can
modify whatever !$ was. When I accidentally type !4<Tab>, it expands to
'vi .zsh_prompt-'. But, if I catch my mistake and type C-/ (which
produces the equivalent of "^_", bound to undo), then delete the '4' and
replace it with '$', <Tab> expands '!$' to '.zsh_prompt-'. (the last
word of command 4 instead of the last word of the previous command.)
Is this behavior expected -- should history expansion/completion
(terminology?) change what '!$' references? If so, is it configurable?
FWIW, my workaround has been to (when I typo, which is frequently):
!4<Tab>
<C-/><Backspace>!$
(ending up with !!$, instead of !$).
--
Best,
Ben
Messages sorted by:
Reverse Date,
Date,
Thread,
Author