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

Re: Zsh showoff

Claus Alboege <tractrix@xxxxxxxxxxxxxx> writes:

> I'm rather new to the zsh, and wonder if someone would show me some
> .zsh* files, that could show some of the nice (and more spectacular)
> features of zsh. Right now I don't care about memory footprint, so
> everything is welcome.

The default behaviour is pretty good.  Here's approximately what I
have in .zshrc:

PS1="%n%# "
[[ $TERM = "xterm" ]] && stty pass8 -ixon && bindkey -me
setopt autopushd autocd autolist
setopt autoparamkeys autoremoveslash cdablevars
setopt completeinword correctall correct equals
setopt extendedglob magicequalsubst histignoredups
setopt numericglobsort pushdignoredups

ttyctl -u

There's some completion stuff, but that's all automatically added in

I'm not sure what would be obvious (other than the current directory
at the right hand side, from RPROMPT, obviously).

autopushcd means that every change directory command acts as a pushd
(so you can use popd to get back to previous directories, which I find

autocd means you can change to directories just by naming them (i.e.,
you can say things like "../../../src", omitting the command "cd").

Probably the one I use most is extendedglob.  All C files underneath
the current working directory modified in the last day, "**/*.c(m-1)",
and stuff.  The ~ operator is handy, too: all files except the C
files, "*~*.c".

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