# which shell is best?



## davidwalden (Dec 7, 2005)

I thought I had posted this question here already but don't see it.  If this is a repost, or if the answer is already given in another thread, please accept my apology.

I'm a relative newbie at Unix.  I purchased a G4 dual processor 450 and had OS X Jaguar 10.2.8 before upgrading to OS X Tiger 10.4.3.

I'm using OS X primarily to use BRL-CAD, and am having lots of learning opportunities getting it going on the Mac, chief among these it seems is that help is offered which usually refers to edits to files used by bash.

Since my shell is tcsh, which I'm told was the default shell in Panther and prior versions of OS X, I am considering switching shells to bash.

My question is: should I switch to bash, and if I choose to do so, how much grief will that cause?

Thanks,

David


----------



## artov (Dec 7, 2005)

davidwalden said:
			
		

> I thought I had posted this question here already but don't see it.  If this is a repost, or if the answer is already given in another thread, please accept my apology.
> 
> Thanks,
> 
> David



Ok, you asked! Best shell is zsh.

And since it is the best, there is no need to tell why...

There are lots of superior features in zsh, but I like its

-   ** expansion. It is like a quick find command built into the shell

    for example: ls **/*.txt 
    shows all *.txt file in current directory, its subdirectories etc.

-   vared; lets you edit environment variables inside the shell. For example
    today, I had to edit Java's CLASSPATH. As you might know, CLASSPATH
    has a habit of getting big. With vared, editing it is easy

-   editting multiline commands. I use for i in *.ext quite alot. With zsh's
    multiline editing, it is easy

And I did not even mention zsh's main features, like parameter expansion:
zsh knows that for command javac, you give parameter that ends with
.java, so typing javac and pressing <TAB> zsh expands only .java filenames.


----------



## davidwalden (Dec 8, 2005)

artov said:
			
		

> Ok, you asked! Best shell is zsh.
> 
> _snip_



Cool, yes that does look interesting and I'll check it out.  But I was hoping to get some input on the relative merits of bash vs. tcsh and how painful it might be to switch shells.

I tried going to the website listed in Shell Differences FAQ to download zsh, but couldn't locate the file(s).  I'll look at the Mac and see if it is available as an option already.

Thanks


----------



## davidwalden (Dec 8, 2005)

I've tried to change the shell as root from tcsh to bash using directions found on Apple's support page for OS X:

Choose Preferences from the Terminal menu. 

Select the option "Execute this command (specify complete path):" 

Change the selected text entry from /bin/tcsh to reflect a different Terminal shell, such as: 
/bin/bash 
/bin/csh 
/bin/zsh 
/bin/zsh-4.0.4 (Mac OS X 10.2.8 or earlier) 
/bin/zsh-4.1.1 (Mac OS X 10.3 or later) 
/bin/ksh (Mac OS X 10.4 or later) 


Close the Terminal Preferences window. 

Quit and open Terminal again. The first and subsequent new Terminal windows open with the shell that you designated in Preferences.​
When I launch terminal I get:

-bash: setenv: command not found
G4:~ root# 

How can this be corrected?  Thanks


----------



## davidwalden (Dec 8, 2005)

Never mind...I changed "setenv DISPLAY:0" to "export DISPLAY:0" in etc/profile and that solved the problem.


----------

