dcsimg

New Shells: vshnu (Revised)

vshnu is a “visual shell” that runs in a terminal window, combining navigation shortcuts with a standard shell and the power of Perl. (Revised 12 November to fix formatting errors.)

Do you spend a lot of time moving around the filesystem with cd commands, typing ls to see what’s there? Do you build lists of arguments on the command line using wildcards or filename completion? If you do a lot of work with files and directories, vshnu (http://www.cs.indiana.edu/~kinzler/vshnu) is worth a look.

vshnu (pronounced “vish-new”) is a “visual shell” that runs in a terminal window. vshnu lists the current directory so you can find files quickly. Select the file or files you want, then run either a built-in command or any other arbitrary command — a shell utility or any Perl code — on those files.

vshnu comes from the early-1980s vsh; the “nu” implies new, and as Steve Kinzler, the author of vshnu says, the name “invokes the Hindu god Vishnu, the preserver of the universe and restorer of dharma (moral order). ” Hmmm, how appropriate.

The premise of vshnu is similar to mc, the GNU Midnight Commander (http://www.ibiblio.org/mc/), but the interface is different. Underneath, vshnu is Perl code, with Perl configuration files, which makes it easy to configure or hack. (You don’t need to be a Perl monk to use vshnu! There are a few Perl-isms here and there, but the rest is quite comprehensible.)

vshnu has been around for years, but there’s not much introductory documentation. Let’s get an overview — enough to get you started, so you can learn more on your own.

Setting up vshnu

vshnu runs from a console or terminal window, and supports color if the terminal does.[ Details of how color in the terminals works can be found in the June 2005 column “What’s GNU, Part One”, available online at http://www.linux-mag.com/2005-06/power_01.html. See the section about the LS_COLORS variable, (which vshnu uses, too).]

Before you start vshnu for the first time, open a console or terminal window and check its environment (with env or printenv). If TERM and LS_COLORS haven’t been set correctly, settings like these may help from a bash shell:

export TERM=xterm-color
eval $(dircolors)

Or, if you use tcsh, try these settings instead:

setenv TERM xterm-color
eval `dircolors`

There’s more setup information on the vshnu home page and in the README file in its tarball. For more about the color files, see the sidebar “dircolors Files.”