[Grml] making zsh beep like bash

Charles Hallenbeck chuckh at hhs48.com
Sat May 20 22:23:07 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I asked the zsh users list about making zsh beep when backspacing on an 
empty line, and received a suggestion that works great for me.

It takes a widget to do that, and a widget can be defined by the 
following several lines:

- -----

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

- -----

I put these lines in /etc/zsh/zprofile, and they apply to all users. zsh 
now beeps just like bash when backspacing on an empty command line.

Chuck

- -- 
The Moon is Waning Crescent (45% of Full)
Get downloads from http://www.mhcable.com/~chuckh
  and remember, INFORMATION WANTS TO BE FREE!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEb3qrXnuiIOyDVQURAtAZAKCTR1oRV8tMwzFG7cPugKu9I8ChbACfb7LD
r2mdnibaC9DPhF+kY1TftUU=
=tsKA
-----END PGP SIGNATURE-----



More information about the Grml mailing list