Bash-CC
Download: bashcc-1.0.2.tar.gz
View: README.bashcc
The Bash-CC package is designed to be useful to Bash
shell users who also use the ClearCase version control system.
ClearCase has a fairly elaborate command-line interface, and this
interface is particularly amenable to the programmable completion
features that have been implemented in recent versions of the Bash
shell.
Most ClearCase users create a ct alias so they don't
have to type cleartool all the time. This package
extends the ct alias and makes it "smart" in the
following ways:
- Cleartool Commands. The first "token" after you type
ct is always a cleartool command.
There are 144 of these (as of ClearCase 4.2) and this package allows
for intelligent completion of them. In addition, if you type
ct help or ct man it will perform
cleartool command completion on the next token.
- Command Options. Each command has a series of options.
If you have already entered a valid command token, and the next token
begins with a dash, the package will let you do completion on that
token based on a list of the available options for that command.
- Views. If the command is view-oriented (that is, the
command token has "view" as a substring), the next token will be
completed based upon the output of ct lsview. This is
probably the one feature I use most often.
- Metadata. If you type ct describe
brtype:<something> the shell will be able to complete
on the <something>. You must define the
$ADMIN_VOB variable in the bashrc_cc
file for this to work.
- Version-Extended Paths. If you type ct describe
HelloWorld.cpp@@ and attempt completion right after the
@@, Bash will perform completion based on the output
of ct lsvtree for the element in front of the
@@.
- More Version-Extended Path Support. There are some
special commands defined, like vcat which will
automatically complete files as version-extended paths. This is
useful if you are trying to track down a version that contains a
particular code change that's been lost or "stepped on". Similar
aliases exist for more, diff, and
cd (for exploring directory versions).
- MultiTool Support. If you run MultiSite with ClearCase
there is an mt implementation as well. It supports
command and option completion but not the other stuff.
If what you just read sounds a little bit too nerdy, just take my word
for it when I say that this is extremely cool and if you spend a lot
of time with ClearCase on the command-line level, you want this! It
took me a while to get it to a point where it was polished enough to
distriubute, and in particular I'd like to thank Chet Ramey (the
maintainer of Bash) for all the work he's put in on the programmable
completion support. It really is quite a breath of fresh air for us
command-line junkies.
For more information, please check out the
README.bashcc file that comes
with the package.
For more information about Bash, please visit:
http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html
For more information about ClearCase, please visit
http://www.rational.com/products/clearcase/
Email: Richard Smith (rss@idiom.com)
Last modified: January 30, 2003.