Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to make ESC to cancel current completion
- X-seq: zsh-users 14857
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: How to make ESC to cancel current completion
- Date: Sun, 21 Feb 2010 15:32:48 -0800
- In-reply-to: <91790a981002211459h70f30599x41fedb93441f7ed6@xxxxxxxxxxxxxx>Comments: In reply to Sébastien Pierre <sebastien.pierre@xxxxxxxxx> "How to make ESC to cancel current completion" (Feb 21, 5:59pm)
- 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
- References: <91790a981002211459h70f30599x41fedb93441f7ed6@xxxxxxxxxxxxxx>
On Feb 21, 5:59pm, Sébastien Pierre wrote:
}
} % ls c/<ESC> # I hit ESC to go back to where I was before hitting tab
} in the first place
} % ls # typing ESC undo-ed the last 'c/' completion
}
} is there an option to make zsh behave like this ?
Are you using vi style bindings (bindkey -v) or emacs style (default)?
In emacs style, it should work to do
bindkey '\e' send-break
but it's possible there are certain circumstances in which a local keymap
will fail to inherit that from the main keymap.
Note that you may also have to wait a fraction of a second after hitting
ESC before the binding kicks in, because there are many keys (such as
arrow and function keys) that send a sequence of characters beginning
with an ESC, and zsh has to wait to determine whether an ESC is meant to
stand on its own.
The default keystroke for this is ctrl+G, by the way.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author