1>>>>>>>>>>>>>>>>>>>>>>>> VSHNU <<<<<<<<<<<<<<<<<<<<<<<<
2>>>>>>>>>>>>>>>>>>>>>>>> The New Visual Shell <<<<<<<<<<<<<<<<<<<<<<<<
3
4 Home Page: http://kinzler.com/me/vshnu
5 Screenshots: http://kinzler.com/me/vshnu/shots.html
6
7----------------------------- MOTIVATION -----------------------------
8
9Skilled Unix users know the importance of the shell or command
10line interface (CLI). (Old-time Unix users didn't even have a
11choice about it). While having more of a learning curve than
12a graphical user interface (GUI), it permits powerful, creative,
13complex operations to be specified quickly and reliably. For anyone
14but the superficial user, learning a CLI is an investment that pays
15off rewardingly. Command line environments are still readily usable
16over low-bandwidth network connections and restricted displays.
17Neal Stephenson explains the history and values of computer
18interfaces exceedingly well in "In the Beginning was the Command Line"
19<https://en.wikipedia.org/wiki/In_the_Beginning..._Was_the_Command_Line>.
20One can even build a strong case that a CLI is best for a learning
21new computer user, as described in "The Command Line - The Best Newbie
22Interface?" <http://osnews.com/story.php?news_id=6282>.
23
24However, when one is concerned about file manipulation and management
25(which is a very good thing to be concerned about as the basis of your
26interface, as most GUIs would rather lead you to forget), a CLI can be a
27frustratingly terse interface to the filesystem. Too many tedious `ls`
28and `cd` commands are needed to keep watch on what's there. A GUI file
29manager can address this problem, but then you're in mouseland and have
30lost the advantages of the CLI.
31
32Enter the visual shells. Not a new idea, visual shells can operate within
33an entire terminal or console screen. File listings are displayed for
34your constant reference. Common commands and operations can typically be
35performed in fewer keystrokes in a visual interface. As the `vi` visual
36editor evolved from the `ed` and `ex` command line editors, visual shells
37have attempted to evolve from command line shells. Some visual shells
38have promoted themselves as simpler menu-oriented interfaces suitable
39for novices, while others emphasize more expert functionality.
40
41Nonetheless, visual shells have never really caught on, except some in
42certain circles such as Emacs' "dired" mode and the Midnight Commander
43program. I believe this is because they have been designed as largely
44self-contained applications with limited configurability. Using a visual
45shell has required a significant jump into a new base interface tool,
46and few are so compelling or standard to make that worthwhile.
47
48Hence the design of `vshnu`, the New Visual Shell. In the Unix
49tradition, it works with things already there and fills a empty niche.
50When incorporating it into your Unix environment, you keep your command
51line shell, your editor, your pager, and access to all your tools, tricks
52and know-how. Vshnu can operate as an optional supplemental visual mode
53to your command line shell. You switch between command line and visual
54mode easily as you wish. Your interface bandwidth and power for Unix
55operations is on a higher plane and life gets sweeter. In addition,
56being written in Perl, it ports to any Unix system without compilation,
57gives you the advantages of a Perl interpreter running readily at
58hand, and permits visual command customizability limited only by your
59creativity, yet doesn't require knowledge of Perl for normal usage.
60Vshnu is a tool that's worthwhile even if only used occasionally as an
61interactive, pageable, color `ls`, yet still pays back, with interest,
62whatever more you put into using it.
63
64------------------------ ADDITIONAL FEATURES -------------------------
65
66* Extensive options for sorting and listing a directory's files
67* Multiple methods for navigating directories and selecting files
68* Directory locations may be marked for quick returns
69* Lists colored command outputs alongside files, including a builtin `ls -l`
70 and `df`
71* Directory and file histories
72* In color terminals, uses color for more informative displays, including
73 file coloring by type via the standard LS_COLORS environment variable
74* Expands and collapses chosen subdirectories
75
76o Multiple methods for choosing and operating on individual or arbitrary
77 sets of files
78o Key commands and file actions are 100% configurable, extensible, self-
79 documenting and arbitrarily complex, including multiple choice options
80o File actions are customizable by file name/type/contents/etc, with
81 common actions configured by default
82o Online help descriptions of key commands and file actions, by mode
83 and by command
84o Separate per-site and per-user configurability
85
86* Adjustable file column displays
87* Adapts to changing screen sizes (but works best on screens 80 characters
88 wide or more)
89* Current directory and environment is propogated between vshnu and
90 the parent command line shell
91* Multiple interfaces for shell commands and Perl statements
92* Perl statements may be {{embedded}} within shell commands
93* A Perl "where" clause to subset the displayed files
94
95o Many actions available via the mouse in terminals with xterm(1)-like
96 mouse support
97o Can use mailcap(4) files for specifying file actions by MIME type
98o Can use the CD_PATH environment variable as a search path for files
99 and directories
100o Recognizes the following standard environment variables:
101 ANSI_COLORS_DISABLED, DISPLAY, EDITOR, HOME, HOST, LS_COLORS, MAIL,
102 MAILCAPS, MAILER, PAGER, PATH, PERL_RL, SHELL, TERM and VISUAL
103
104------------------------------ HISTORY -------------------------------
105
106Vshnu was inspired by and initially patterned after the program
107`vsh`, the Visual Shell <http://kinzler.com/me/vshnu/vsh.txt>
108<http://kinzler.com/me/vshnu/vsh-4.2k.tgz>. Vsh was written in the
109early 1980's and is pretty much obsolete bit rot now. After failing to
110be included in a BSD distribution, it faded into obscurity. A SunOS port
111hasn't compiled since the pre-Solaris days, and an attempted Linux port
112is still horrendously buggy. But, it started with some right ideas. I
113used vsh almost my entire Unix career before finally writing vshnu to
114replace, extend and modernize it.
115
116The "nu" in "vshnu" implies "new", of course, as well as invokes the
117Hindu god Vishnu, the preserver of the universe and restorer of dharma
118(moral order). Hmmm, how appropriate.
119
120---------------------------- INSTALLATION ----------------------------
121
1221) PREREQUISITES
123
124 You need Perl 5.002 or greater with the Term::Screen and
125 Term::ANSIColor modules -- all available at <http://www.cpan.org>.
126 Term::Screen and Term::ANSIColor module files are also included
127 here in the libperl/Term directory. If you wish to install these,
128 just add a ".pm" extension to the filenames and copy them into a
129 directory in your Perl's @INC or into $HOME/perl/Term, $HOME/lib/Term,
130 or $HOME/lib/perl/Term.
131
132 Term::Screen uses Term::Cap, so you'll need a termcap file containing
133 your terminals' capabilities definitions. Most systems already
134 have one, but in case yours doesn't, a very complete termcap file is
135 available at <http://www.tuxedo.org/~esr/terminfo/termtypes.tc.gz>.
136 A much briefer one containing only some common terminals is
137 at <http://kinzler.com/me/home.html#etc/termcap>. The termcap
138 file may be installed as $TERMCAP, $HOME/.termcap, /etc/termcap
139 or /usr/share/misc/termcap. Or on (older) Debian systems, you can
140 just run `apt-get install termcap-compat`.
141
1422) OPTIONAL
143
144 The Term::ReadLine::Gnu, or at least the Term::ReadLine::Perl, module
145 is recommended to provide line editing, history, filename completion,
146 and insertions (with M-v) within vshnu <http://www.cpan.org>. Other
147 modules that Perl can use, if installed, for particular features are
148 Data::Dumper, Filesys::DiskFree, MIME::Types and Mail::Cap.
149
150 If available, vshnu can make good use of color in a terminal or
151 console with ANSI color support, and this is highly recommended. For
152 X Windows, the latest versions of `xterm` have proper color support
153 <http://www.clark.net/pub/dickey/xterm/>. Make sure your termcap
154 information is properly defined for your color terminal. You'll then
155 also want the GNU fileutils software <ftp://alpha.gnu.org/gnu/fetish/>
156 which includes the `dircolors` tool for setting your LS_COLORS
157 environment variable. This variable is referenced by GNU `ls` and
158 vshnu to determine how files should be colored by type and name.
159 As an example, the file color specification file I use is available
160 at <http://kinzler.com/me/home.html#etc/colorrc-ansi>.
161
162 A terminal with xterm(1)-like mouse support will enable the use of
163 vshnu's mouse functionality.
164
165 The `xcb` utility will be required for the interfaces to the X11
166 cut buffer to work <http://www.goof.com/pcg/marc/xcb.html>.
167
1683) INSTALLATION
169
170 Vshnu may be installed either as a regular Perl module or manually
171 in any desired locations, including your home directory.
172
173 A) AS A PERL MODULE
174
175 The usual routine
176
177 perl Makefile.PL
178 make install clean
179
180 should properly install the "vshnu" file in your Perl scripts
181 directory and the "vshnucfg.pl" file in your Perl library
182 directory.
183
184 B) MANUALLY
185
186 You can edit the first line of the "vshnu" script here to contain
187 the proper path to your perl executable, then copy it into any
188 directory in your PATH. Make sure the copy's made executable.
189
190 Then the "vshnucfg.pl" file can be copied where you wish. If it's
191 not installed as $HOME/.vshnucfg or as vshnucfg.pl somewhere in
192 your Perl's @INC or in $HOME/perl, $HOME/lib or $HOME/lib/perl,
193 then you'll have to set the VSHNUCFG environment variable to its
194 location, or edit the installed "vshnu" script near the top to
195 set $default_vshnucfg.
196
1974) SHELL INTEGRATION
198
199 Optionally, your regular shell environment can be enhanced to interact
200 with vshnu as a sort of supplemental visual mode, communicating
201 any environment changes to vshnu and directory changes between the
202 two shells.
203
204 See the subdirectory here for your command line shell for further
205 direction. Contributions of other shell integrations are very
206 welcome.
207
2085) PERSONAL CONFIGURATION
209
210 The installation procedure described above installs the main vshnu
211 "engine" script and the supplied required configuration file.
212 An entirely new configuration file could be written and substituted
213 for the supplied one for a vshnu with a very different key command
214 structure and operation (modeless perhaps). Contributions of
215 additions or improvements to the vshnucfg file are welcome.
216
217 Usually, though, you'll just want to add on some personal extras or
218 tweak a few things in the supplied configuration. This can be done
219 with a "vshnurc" Perl file. It's loaded after the "vshnucfg" Perl
220 file (installed above) and so can modify or supplement the effects
221 of anything in it. Both of these files are just Perl code that
222 define operating structures for vshnu's environment. The location
223 of the vshnurc file is assumed to be $HOME/.vshnurc (or vshnurc.pl
224 in Perl's @INC or in $HOME/perl, $HOME/lib or $HOME/lib/perl) unless
225 the VSHNURC environment variable is set (or the $default_vshnurc
226 variable is set in the vshnucfg file). My personal vshnurc file
227 is included here as "vshnurc.pl" as an example to start your own.
228 Some familiarity with Perl will probably be required to do any
229 significant work within these files.
230
231 If the Mail::Cap, and perhaps MIME::Types, modules are available,
232 vshnu's supplied configuration will use any mailcap(4) files it finds
233 (in $MAILCAPS or $HOME/.mailcap, /etc/mailcap, /usr/etc/mailcap and
234 /usr/local/etc/mailcap) for offered file actions for any file types
235 it doesn't otherwise cover. Also, it will recognize a vshnu-specific
236 mailcap file (in $VSHNUCAP or $HOME/.vshnucap or the $default_vshnucap
237 variable set in the vshnucfg file) for file actions to supersede
238 its usual configuration. For example, if you prefer xv(1) over
239 display(1) for viewing image files, you may find adding this line
240 to your vshnucap file simpler than changing your vshnurc file:
241
242 image/*; xv %s; dontneedterminal
243
244------------------------------- USAGE --------------------------------
245
246This is the minimum you'll want to know to make some good use of vshunu
247with the supplied configuration:
248
249 Upon starting vshnu, you should see a listing of the files in your
250 current directory. You can enter a subdirectory by typing the
251 letter that labels it. Typing the label letter of a file will load
252 that file into your editor. You can go up to the parent directory
253 with <Return> or back to the previous directory with '\'. With '.'
254 you can enter a file or directory to go to. <Tab> and <Backspace>
255 (or <Delete>) will slide the labels (aka the "bag") around to the
256 other files on the screen. <Space> will page to the next screenful of
257 files in the current directory. Typing 'L' repeatedly will display
258 the long listings of the files in the bag's column (<Control-L> will
259 clear the long listings). ':' will let you run a shell command.
260 'V' will suspend vshnu, dropping you back into the invoking shell.
261 <Control-Q>q (or <Control-Z>q) will exit vshnu.
262
263 With the mouse, you can left-click on a subdirectory name to enter
264 it, or on a filename to load it into your editor. Center-click on
265 the background to go up to the parent directory, or right-click
266 there to go back to the previous directory. Use the mouse scroll
267 wheel on the background to page to other screenfuls of files in
268 the current directory, or on the time to display the long listings
269 (right-clicking on the time will clear the long listings).
270
271Of course, there's much, much more possible. Type '%' within each mode
272of vshnu to see all the key commands available and what they'll do.
273Type '&' to see what file actions will be performed upon selecting files
274in the current file action mode. Type <Control-N> followed by a key to
275see what would happen with that key command. Type '^' to see all the
276available mouse commands.
277
278Here's a summary of the modes in the supplied configuration, with the
279keys to enter and exit each mode:
280
281MODE KEY KEY COMMAND MODES
282~~~~ ~~~ ~~~~~~~~~~~~~~~~~
283main The starting mode and most commonly used.
284choose / Selected files are added to the set of chosen files.
285 Main mode commands are available here, too, though a few
286 change meaning. Additional key commands are available
287 that operate on the chosen file set.
288opts O Sets and unsets various options for sorting and listing
289 the display. Type '%' in opts mode for a complete
290 options list. This mode exits automatically after an
291 option key is selected.
292
293
294MODE KEY FILE ACTION MODES
295~~~~ ~~~ ~~~~~~~~~~~~~~~~~
296edit The starting mode where files are editted and directories
297 are entered.
298do ? Special action is taken depending on the nature of the
299 file selected, eg, GIF files are viewed, archive files
300 have their contents listed, etc.
301expand " Selected directories are expanded in the file listing,
302 or collapsed if they're already expanded.
303
304------------------------- ADDITIONAL RESOURCES -------------------------
305
306* The latest developer's version of the vshnu source files are available
307
308 http://kinzler.com/me/home/binp/vshnu
309 http://kinzler.com/me/home/etc/vshnucfg
310 http://kinzler.com/me/home/etc/vshnurc
311
312* A web forum and mailing list for discussion, support and announcements
313 regarding vshnu is available at
314
315 http://groups.yahoo.com/group/vshnu
316
317* An introductory article on using vshnu was published in the
318 November 2005 issue of Linux Magazine (US version) in Jerry
319 Peek's Power Tools column, pages 12-17. It's available online at
320 <http://www.linux-mag.com/id/2326>. There's also a bit in Hebrew
321 online at <http://linmagazine.co.il/book/view/8177>.
322
323* CaFe.pm <http://cafe.pm.org/>, a Perl Mongers group in Argentina, has
324 published an interview by V�ctor A Rodr�guez with Steve Kinzler about
325 vshnu in their April 2006 bulletin, issue 1.0. It's available online at
326 <http://cafe.pm.org/boletines/Issue.v1.0.pdf>, with the original English
327 version at <http://kinzler.com/me/vshnu/perlitas.html>.
328
329* A Japanese review and showcase of vshnu was published in the September
330 2001 issue of Linux Magazine <http://www.ascii.co.jp/linuxmag/>,
331 pages 124-125.
332
333--------------------------- GPL COPYRIGHT ----------------------------
334
335vshnu: the New Visual Shell
336Copyright (C) 1999 Stephen B Kinzler
337
338This program is free software; you can redistribute it and/or modify
339it under the terms of the GNU General Public License as published by
340the Free Software Foundation; either version 2 of the License, or any
341later version.
342
343This program is distributed in the hope that it will be useful, but
344WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
345or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
346for more details.
347
348You should have received a copy of the GNU General Public License along
349with this program (see the file "COPYING"); if not, write to the Free
350Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
351MA 02110-1301 USA
352
353--------------------- SOFTWARE BY STEVE KINZLER ----------------------
354
355Unix Home Dir http://kinzler.com/me/home.html
356 Many scripts and config files for Unix/X11 environments
357align http://kinzler.com/me/align
358 A text column alignment filter
359vshnu http://kinzler.com/me/vshnu
360 A visual shell and CLI shell supplement
361webrowse http://kinzler.com/me/webrowse
362 Tools to interface web browsers to the Unix user CLI
363xtitle http://kinzler.com/me/xtitle
364 Set window title and icon name for an X11 terminal window
365z http://kinzler.com/me/z
366 A convenience frontend for tar, gzip, zip, etc
367
368========================================================================
369
370Steve Kinzler <steve@kinzler.com> November 2000
371http://kinzler.com/me revised April 2019
372
373Your feedback is welcome!
374