Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Please help notorious "space"-mistyper
- X-seq: zsh-users 2737
- From: Stefan Troeger <stefan.troeger@xxxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: Please help notorious "space"-mistyper
- Date: Sun, 14 Nov 1999 18:50:17 +0100
- In-reply-to: <Pine.A41.3.96.991114143719.83210A-100000@xxxxxxxxxxxx>; from Jens.Schleusener@xxxxxx on Sun, Nov 14, 1999 at 02:52:13PM +0100
- Mail-followup-to: zsh-users@xxxxxxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <Pine.A41.3.96.991114143719.83210A-100000@xxxxxxxxxxxx>
Hi,
On Sun, Nov 14, 1999 at 14:52 +0100, Jens Schleusener wrote:
> I like to use zsh and the command line and change often the working
> directory. But unfortunately nearly each second time I type (too fast)
>
> cddirectory
>
> instead of
>
> cd directory
>
> That is time consuming and nerve-racking.
Try
function my-accept-line()
{
if ! whence $BUFFER >/dev/null && [[ $BUFFER == cd* ]] && [[ -d ${BUFFER#cd} ]]; then
BUFFER=${BUFFER/#cd/cd }
fi
zle accept-line
}
zle -N my-accept-line
bindkey "^m" my-accept-line
Ciao,
Stefan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author