James Bowes

Purveyor of Pre-eminent Programmes

The Bash shell and why you’re already using it

with one comment

This is, of course, a reply to Devan’s post about the Z shell, as I was one of the curious folks always bugging him about why he used it.

First, the one advantage I know of that zsh has over bash: It lets me say “The Zed Shell” which is great fun down here in North Carolina.

The default keybinding for interactive command history search is ctrl-r (search backward through the history). This command prompts for input, rather than using what has already been typed. You can set up history search like zsh has with:

$ bind ctrl-p:history-search-backward
$ bind ctrl-n:history-search-forward

Intelligent tab completion is enabled by default in most linux distributions, if not, you probably just have to comment out a line in your bashrc, or install a bash-completion package.

Devan’s right; bash has all of the directory stack features that he listed for zsh.

alias -g and alias -s do seem to be unique to zsh. You’ve won this round, Zed Shell.

In bash, you can also use the ! to recall command history with find and replace.

vim **/file.py will open the first file named file.py in your directory tree in bash, too.

zsh does have a few more features than bash. I have yet to see anything revolutionary enough to make me switch shells. Unfortunately for zsh, it has an uphill battle against all of the test systems I work with that come pre-installed with bash.

Advertisements

Written by jbowes

January 23, 2007 at 8:24 pm

Posted in tech

One Response

Subscribe to comments with RSS.

  1. […] saw the shell talk on the planet and just had to weigh […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: