[SlugLUG] What am I missing out on?
Ignacio Solis
isolis at igso.net
Wed May 17 12:07:53 PDT 2006
* Rohan Sheth (rohan at rohan.ws) said:
> A lot of people have told me zsh is much better than bash...can anyone
> toss me a few of the highlights of its features before I install it and
> start playing?
Just remember you need a minimal configuration for it to start feeling good.
Here's a small piece of my .zshrc:
#####################################################
# Configure history, a big history
HISTFILE=$HOME/.zsh_history
SAVEHIST=5000
HISTSIZE=5000
######################################################
# Configure modules, etc.
autoload -U compinit
compinit
autoload -U colors
colors
########################################################
# Lets set the prompt
PS1="%{$fg[cyan]%}[%{$fg[default]%}%n%{$fg[cyan]%}@%{$fg[default]%}%m%{$fg[cyan]%}:%{$fg[default]%}%~%{$fg[cyan]%}]%(!.#.$)%{$fg[default]%}
"
You might also want to check the function compinstall. (man zshall, search for
compinstall).
You'll probably want to customize your prompt... and maybe your key bindings.
(man zshall or zshzle, look at bindkey).
You can google for zsh vs bash if you want. Some discussions are old though.
One of the best features is obviously command completion. I know recent bash
versions do good completion, but I don't think they're at zsh level yet. (some
one correct me if I'm wrong, I haven't used bash in a while).
In zsh you can autocomplete:
scp somefile remote.server.com:/some/remote/path/autocom<TAB>
or
tar -xzf somefile.tar.gz some/file/inside/the/tar<TAB>
or
kill -9 1<TAB> (list of pids)
or
ls --<TAB> (list of options)
etc.
A lot of other stuff is probably in bash already, multi-line editing, vedit,
csh + sh syntax, etc.
After all, it's just a shell right? :-)
Nacho
--
Homepage: http://www.igso.net/~isolis/ | EEE8 08C9 FBAE B471 9691
GPG Public Key: http://www.igso.net/isolis.gpg | CE7A 1CC8 D3DE B31E 10AB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://sluglug.ucsc.edu/pipermail/sluglug/attachments/20060517/1c63773f/attachment.pgp
More information about the Sluglug
mailing list