You are not logged in.

#1 2005-07-16 18:56:28

max_sipos
Member
From: Ithaca, NY
Registered: 2004-10-31
Posts: 106
Website

Zsh

I just saw the poll about your favourite shell. I've always used bash and with little extra configuration.

However, I remembered that a few years ago a friend of mine was showing me some neat functions he had in his shell (and I think it was Zsh, but I could be wrong). For instance he could start typing tar and then, if he had forgotten some obscure flag he would get a sort of a mini refererence page popup below, like autocompletion in bash (with <tab><tab>). Was this zsh? How do you do this?

I've found quite a bit of documentation on zsh online, however I don't feel like spending the day customizing a shell. I've found a few premade .zsh scripts online but most of them were 1000+ lines monstrosities. So, how about zsh veterans share some good tips they have in their .zshenv?

Offline

#2 2005-07-16 18:57:15

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Zsh

pacman -S bash-completion

will give you the same thing under bash

Offline

#3 2005-07-16 20:07:41

max_sipos
Member
From: Ithaca, NY
Registered: 2004-10-31
Posts: 106
Website

Re: Zsh

Thanks, I didn't know about that.

I've tried it out, the trick is to run . /etc/bash_completion

It seems nice, however it's a bit slow (terminals take a few seconds to become usable) which is not surprising taking into account that bash_completion is a huge bash script. I wonder if zsh's completion (however you actually activate it) is faster?

It would also be neat if the output was more verbose, where possible. That is, for programs with sufficiently small number of arguments, to actually explain what those flags do...
for instance like here smile
http://grml.org/screenshots/cdrec.png

Offline

#4 2005-07-16 21:03:08

max_sipos
Member
From: Ithaca, NY
Registered: 2004-10-31
Posts: 106
Website

Re: Zsh

OK, I've got it, at last.

you have to type:
autoload -U compinstall

and then go through the configuration menu and save your configuration to ~/.zshenv
Works great and the output is much better than bash-completion (IMHO). It also doesn't slow down the terminal opening.

Offline

Board footer

Powered by FluxBB