zsh and bash [was: can't the shell do a better job]
On Fri, Jan 07, 2005 at 07:54:54PM -0600, Aaron Hall wrote:
> * The completion system is very good, and smart completions for many
> different commands are standard. I think you can get write a
> completion to get zsh to feed your fish, but that requires knowledge
> of styles.
Is the smart completions significantly better than or different from
> * You can bind keys to scripts that manipulate the command line you're
> currently editing. One keystroke pops me into vi where I can edit,
> quit, and run my edited command.
Apparently you can do this in bash too, with ^X^E. You need to set
EDITOR or VISUAL to your favorite editor else it uses emacs. This will
be very useful for converting one-liners into scripts, thanks for
> * push-line: you're typing up a fairly complex find command, and you
> suddenly can't recall if find on this machine has -regex. Just hit
> Ctrl-Q, and you've got a new, blank command-line whence you can run
> man find. When you're done with man (actually, the next time zsh
> displays a prompt), your find command is back, with your cursor right
> where you left it.
I use ^A # enter to achieve this in bash. Ironically this technique
does not work in zsh. I use commenting a lot when writing one-line
shell pipelines (to check if half the pipeline is working). Apparently
you can get zsh to do this too by setting an INTERACTIVE_COMMENTS