zsh-users
 help / color / mirror / code / Atom feed
From: Frank Terbeck <frank.terbeck@rwth-aachen.de>
To: zsh list <zsh-users@sunsite.dk>
Subject: Re: making zsh beep
Date: Sat, 20 May 2006 22:02:38 +0200	[thread overview]
Message-ID: <20060520200238.GD2793@fsst.voodoo.lan> (raw)
In-Reply-To: <20060520193042.GA922@hhs48.com>

Charles Hallenbeck <chuckh@hhs48.com>:
> 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


      reply	other threads:[~2006-05-20 20:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-20 19:30 Charles Hallenbeck
2006-05-20 20:02 ` Frank Terbeck [this message]

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=20060520200238.GD2793@fsst.voodoo.lan \
    --to=frank.terbeck@rwth-aachen.de \
    --cc=zsh-users@sunsite.dk \
    /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).