<p>The default shell in Mac OS X is <code>bash</code>, which I'm generally happy to be using. I just take it for granted. It would be really nice if it auto-completed <em>more stuff</em>, though, and I've heard good things about <code>zsh</code> in this regard. But I don't really have the inclination to spend hours fiddling with settings to improve my command line usage by a tiny amount, since my life on the command line isn't that bad. </p>

<p>(As I understand it, <code>bash</code> can also be configured to auto-complete more cleverly. It's the configuring I'm not all that keen on.)</p>

<p>Will switching to <code>zsh</code>, even in a small number cases, make my life easier? Or is it only a better shell if you put in the time to learn <em>why</em> it's better? (Examples would be nice, too <code>:)</code> )</p>

<hr>

<p>@<a href="https://stackoverflow.com/questions/43321/worth-switching-to-zsh-for-casual-use#43340">Rodney Amato</a>
&amp;
@<a href="https://stackoverflow.com/questions/43321/worth-switching-to-zsh-for-casual-use#43338">Vulcan Eager</a>
give two good reasons to respectively stick to <code>bash</code> and switch to <code>zsh</code>. Looks like I'll have to investigate both! Oh well <code>:)</code></p>

<p>Is there anyone with an opinion from both sides of the argument?</p>

[{'answer_id': 43323, 'author': 'Staale', 'author_id': 3355, 'author_profile': 'https://Stackoverflow.com/users/3355', 'pm_score': 3, 'selected': False, 'text': "<p>zsh has a console gui configuration thing. You can set it up pretty quickly and easily without having to fiddle with configuration files. I don't think you will need much time to set it up, probably 10 seconds with just using defaults, so go ahead and try it out.</p>\n"}, {'answer_id': 43338, 'author': 'Agnel Kurian', 'author_id': 45603, 'author_profile': 'https://Stackoverflow.com/users/45603', 'pm_score': 2, 'selected': False, 'text': '<p>Staale is talking about a wizard like program (CUI) which autoruns the first time you run zsh. Just answer some questions, view/change the defaults and its configured for you.</p>\n\n<p>IBM developerWorks has great resources on zsh.</p>\n\n<p>I have not used very advanced features and so far I have not come across serious differences which should hamper someone coming from bash.</p>\n\n<p>Some examples:</p>\n\n<ul>\n<li><p>!?pattern&lt;Tab&gt; will autocomplete to\nthe last command in history matching\npattern. Very useful.</p></li>\n<li><p>You can configure a prompt on the\nRHS. One use is to keep a fixed\nwidth prompt on the left hand side\nso all commands line up nicely while\ndisplaying the pwd (or anything of\nvariable width) as the right hand\nside prompt.</p></li>\n<li><p>You can redirect input from multiple files (yet to try this): cat &lt; file1 &lt; file2 &lt; file3 </p></li>\n</ul>\n'}, {'answer_id': 43340, 'author': 'Rodney Amato', 'author_id': 4342, 'author_profile': 'https://Stackoverflow.com/users/4342', 'pm_score': 7, 'selected': True, 'text': '<p>For casual use you are probably better off sticking with bash and just installing bash completion. </p>\n\n<p>Installing it is pretty easy, grab the bash-completion-20060301.tar.gz from <a href="http://www.caliban.org/bash/index.shtml#completion" rel="noreferrer">http://www.caliban.org/bash/index.shtml#completion</a> and extract it with </p>\n\n<pre><code>tar -xzvf bash-completion-20060301.tar.gz\n</code></pre>\n\n<p>then copy the bash_completion/bash_completion file to /etc with </p>\n\n<pre><code>sudo cp bash_completion/bash_completion /etc\n</code></pre>\n\n<p>which will prompt you for your password. You probably will want to make a /etc/bash_completion.d directory for any additional completion scripts (for instance I have the git completion script in there).</p>\n\n<p>Once this is done the last step is to make sure the .bash_profile file in your home directory has </p>\n\n<pre><code>if [ -f /etc/bash_completion ]; then\n     . /etc/bash_completion \nfi\n</code></pre>\n\n<p>in it to load the completion file when you login. </p>\n\n<p>To test it just open a new terminal, and try completing on cvs and it should show you the cvs options in the list of completions.</p>\n'}, {'answer_id': 83754, 'author': 'Matt', 'author_id': 15368, 'author_profile': 'https://Stackoverflow.com/users/15368', 'pm_score': 6, 'selected': False, 'text': '<p>Personally, I love zsh. </p>\n\n<p>Generally, you probably won\'t notice the difference between it and bash, until you want to quickly do things like recursive globbing:</p>\n\n<ul>\n<li><code>**/*.c</code> for example.</li>\n</ul>\n\n<p>Or use suffix aliases to associate specific progs with different suffixes, so that you can "execute" them directly. The below alias lets you "run" a C source file at the prompt by simply typing <code>./my_program.c</code> – which will work exactly as if you typed <code>vim ./my_program.c</code>. (Sort of the equivalent to double clicking on the icon of a file.)</p>\n\n<ul>\n<li><code>alias -s c=vim</code></li>\n</ul>\n\n<p>Or print the names of files modified today:</p>\n\n<ul>\n<li><code>print *(e:age today now:)</code></li>\n</ul>\n\n<p>You can probably do all of these things in bash, but my experience with zsh is that if there\'s something I want to do, I can probably find it in <a href="http://grml.org/zsh/zsh-lovers.html" rel="noreferrer" title="ZSH-LOVERS(1)">zsh-lovers</a>.\nI also find the book \'<a href="https://rads.stackoverflow.com/amzn/click/com/1590593766" rel="noreferrer" rel="nofollow noreferrer" title="Amazon.com: From Bash to Z Shell: Conquering the Command Line: Oliver Kiddle, Jerry Peek, Peter Stephenson: Books">From Bash to Z-Shell</a>\' really useful.</p>\n\n<p>Playing with the mind bogglingly large number of options is good fun too!</p>\n'}, {'answer_id': 106317, 'author': 'jkramer', 'author_id': 12523, 'author_profile': 'https://Stackoverflow.com/users/12523', 'pm_score': 4, 'selected': False, 'text': '<p>If all you want to use ZSH for is better completion, the configuration is pretty easy. Place this in your ~/.zshrc:</p>\n\n<pre><code>autoload -U zutil      # [1]\nautoload -U compinit   # [2]\nautoload -U complist   # [3]\ncompinit\n</code></pre>\n\n<p>However, it\'s worth checking out all the other great features of the ZSH. The above example will give you a pretty plain prompt with good completion. If you don\'t want to fiddle with configurations, but want to see what ZSH can do for you, Google for "zshrc" and you will get some ready to use configurations to get started.</p>\n\n<ul>\n<li>[1]: <a href="http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fzutil-Module" rel="noreferrer">http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fzutil-Module</a></li>\n<li>[2]: <a href="http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Initialization" rel="noreferrer">http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Initialization</a></li>\n<li>[3]: <a href="http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcomplist-Module" rel="noreferrer">http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcomplist-Module</a></li>\n</ul>\n'}, {'answer_id': 909650, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 5, 'selected': False, 'text': "<p>Switch to zsh. You will have access to:</p>\n\n<ol>\n<li><code>zmv</code>: You can do: <code>zmv '(*).mp3' '$1.wma'</code> for thousands of files.</li>\n<li><code>zcalc</code>: Extremely comfortable calculator, better than <code>bc</code>.</li>\n<li><code>zparseopts</code>: One-liner for parsing arbitrary complex options given to your script.</li>\n<li><code>autopushd</code>: You can always do <code>popd</code> after <code>cd</code> to change back to your previous directory.</li>\n<li>Floating point support. It is needed from time to time.</li>\n<li>Hashes support. Sometimes they are just a key feature.</li>\n</ol>\n"}]
['https://Stackoverflow.com/questions/43321', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4161/']