Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Mimicking tcsh line-editing behavior



On 2.7.2009, Mikael wrote:
2009/7/2 Rhyme Tan <rhymetan@xxxxxxxxxxxxxx>:

> > My default shell is tcsh. In tcsh I can use alt(meta)-backspace, alt-F or
> > alt-B to delete, or move forward or backward through a path.

[...]

> > Is there some magic config option I can pass to zsh to
> > duplicate the behavior of alt-backspace, -F, or -B) in tcsh?
> >
> > Thanks.
>
> This was posted here some time ago (months, years, who knows?) and I
> have used it since:

[...]

> zle -N _backward-delete-to-space
> zle -N _forward-delete-to-space

I removed "space" as a word separator (I deleted all references
to "_my_extended_wordchars_space") since I only see spaces as
part of Mac and MS Win file names.

I also tried to simplify the bindings from:

> bindkey "^[^B"    _backward-to-/
> bindkey "^[^F"    _forward-to-/

to:

bindkey "[B"    _backward-to-/
bindkey "[F"    _forward-to-/

But this appears to disable the file name tab completion?

> adjust the bindings to your liking obviously. It is not perfect when
> it comes across some multibyte characters i think.

Once again, thanks!






Messages sorted by: Reverse Date, Date, Thread, Author