Todd A. Jacobs wrote: > Mark C. Ballew wrote: > > Hey, I use bash! Amber and Nathan haven't quite talked me > > over to zsh just yet. > > What can zsh do that bash can't?
Among the most useful in my everyday experience is
context-sensitive, programmable tab-completion.
$ tar zxf /stuff/tarballs/<tab>
will attempt to complete only with files matching *.tar.gz or *.tgz
extensions.
$ tar jxf /stuff/tarballs/<tab>
will attempt to complete only with files matching *.tar.bz2, etc.
The same goes for .zip files and countless other types.
$ grep <tab>
won't do anything except beep or flash at you because zsh doesn't
claim to know what you want as a regex. :)
$ grep -<tab>
will display a list of possible switches for use with grep, as
well as a brief description for each.
$ perl -<tab>
does the same for perl. And even:
$ dpkg <tab>
My zsh came preconfigured to work with these commands, but it's
possible to add your own if there's an often-used command you
think could benefit from this feature.
If configured, zsh can display browseable list of potential
completions, selectable with arrow keys. zsh also has a more
intuitive rcfile sequence.
zsh shell scripting is compatible with bash and has many useful
extensions, though generally, if I can't do it easily with the
Bourne shell, I fall back to perl to give myself room to grow. :)
zsh may not be for everyone, but if you spend a lot of time on
the command line and like an interactive shell that's willing to
do things for you and do so intelligently, it's worth checking
out.
Cheers,
Timmy Hammerquist
--
Imagine if every Thursday your shoes exploded if you tied them
the usual way. This happens to us all the time with computers,
and nobody thinks of complaining.
-- Jeff Raskin, "Doctor Dobb's Journal"
pgp00000.pgp
Description: PGP signature
