[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: zsh vs bash



Both are excellent interactive shells.

>* automatic completion on variables names,  e.g. type
> "export DISP" and hit tab.  (I just checked,  in bash you can use
>  Esc-$ to specifically complete a variable name;  in zsh the default
>  compctl (completion) has been setup to complete for a variable name
>  if the command is "export".   While the zsh seemed easier,  I guess
>  the bash approach allows you to control it more.)

IIRC bash will complete over variable names when you write a $ at the
start.  zsh has other cute completion features, e.g. I have this in my
.zshrc:

    hosts=(valour cushioned myrddin tacitus chiark \
	mercury.elmailer.net wigwam.elmail.co.uk sunsite.doc.ic.ac.uk \
	ftp.uu.net ftp.sendmail.org tlingit.elmail.co.uk)
    ssh=(chiark)
    compctl -k ssh ssh
    compctl -k hosts telnet ftp rlogin rsh ping traceroute
    compctl -k hosts -f rcp scp

which gives me hostname completion on a selection of network commands.

>There are 2 programs that really pay off putting a bit of effort into
>learning: the shell you use and the editor you use.   Picking a "simple
>and easy to use" editor is a short sighted approach.  Pick a powerful
>editor and invest some time in learning it.   (You don't have to learn
>it all,  and you don't have to learn all that much at first, either.)
>It will really pack off.   And I think the same philosophy applies,
>perhaps to a lesser degree,  to the shell you use.

Agreed.

-- 
Richard Kettlewell               http://www.elmail.co.uk/~richard/


Reply to: