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

contrib: auto-correct, cd-expand



Here are some interactive functions I've been happily using for a
while.

quarl-auto-correct: automatically correct common typos.
- E.g. "c d" => "cd ", "cxat " => "cat "
- This is much more powerful than aliases; evolved out of separate
  functions I had for fixing "cv sup", "sv nup", "find.", etc.

quarl-cd-expand: auto-expand "cd foo" to "cd <pwd>/foo"
- Useful if you often reuse "cd" history.

Since I have multiple scripts that want to modify behavior of the
same widgets, I have:

quarl-add-hook: allow multiple "hooks" to widgets (in the style of
Emacs hooks).

To use, put files in fpath and run:

    autoload -U quarl-auto-correct-on && quarl-auto-correct-on
    autoload -U quarl-cd-expand-on && quarl-cd-expand-on

Attachment: quarl-auto-correct-on
Description: Binary data

Attachment: quarl-cd-expand-on
Description: Binary data

Attachment: quarl-add-hook
Description: Binary data


-- 
Karl 2005-08-26 17:31


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