Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: making zsh beep
- X-seq: zsh-users 10286
- From: Frank Terbeck <frank.terbeck@xxxxxxxxxxxxxx>
- To: zsh list <zsh-users@xxxxxxxxxx>
- Subject: Re: making zsh beep
- Date: Sat, 20 May 2006 22:02:38 +0200
- In-reply-to: <20060520193042.GA922@xxxxxxxxx>
- Mail-followup-to: zsh list <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Operating-system: Linux 2.6.16.16 i686
- References: <20060520193042.GA922@xxxxxxxxx>
Charles Hallenbeck <chuckh@xxxxxxxxx>:
> I have installed zsh as a login shell and have done a bunch of
> configuring, but there is one feature I would like it to do that bash
> used to do, and cannot seem to locate any info on it.
>
> In bash, backspacing on an empty command line produced a beep. How can I
> make zsh do that?
>
> I have setopt beep in a startup file, and ambiguous filename expansions
> cause a beep. But backspacing on an empty command line does not. What
> have I overlooked?
Hi Charles,
If you'd like the line editor to beep, you'll have to add a widget
that does that. I don't think that there's an option for that.
Try:
backward-delete-char-beep() {
if (( CURSOR == 0 )) ; then
zle beep ;
fi ;
zle backward-delete-char
}
zle -N backward-delete-char-beep
bindkey "^?" backward-delete-char-beep
That should do the trick.
Regards, Frank
Messages sorted by:
Reverse Date,
Date,
Thread,
Author