[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] ANN: tlash, a bash environment for tla

From: David Allouche
Subject: [Gnu-arch-users] ANN: tlash, a bash environment for tla
Date: Sun, 14 Mar 2004 20:27:30 +0100
User-agent: Mutt/

I just released tlash, a bash environment for tla, in my personal
tlacontrib branch:


When working with tla people sometime find themselves defining many
"tla-<foo>" aliases and functions for commonly used commands. Some
commonly used command, like commit, sometimes get a first-class alias of
their own (like "alias commit='tla commit -s'"), but this approach is
limited because the shell environment must stay practical for non-tla
work. Also this makes it problematic to change the behaviour of
``canonical'' commands (see a recent discussion about checking for
changes before merge commands).

The approach of tlash is to remove that limitation: the shell you use
when working with tla need not stay practical for general work, you are
allowed to populate it senseless with single word aliases, which you can
easily redefine.

Practically the implementation is trivial (though the devil lies in the
details): the main tlash script does some magic (ripped off aba) to
figure out its own location then does

  bash --rcfile "$tlashdir"/tlashrc

tlashrc then sources the files in the "$tlashdir"/tlash.d directory in
the usual run-parts style (actually it is modified from Debian Xsession

The tlash.d directory contains files which:

  -- source ~/.bashrc

  -- define aliases for all tla commands, except for "tla help", you no
     longer need to wear off your [t], [l] and [a] keys for every commands

  -- define several shortands I found useful

  -- set the PATH to include $tlashdir/bin (which contains some contrib
     scripts of mine), the PS1 to be distinctive (we are no longer in a
     generic shell), and define convenient "restart" and "reload"
     command to apply changes to the tlash configuration

  -- source ~/.tlash if it is a file, or source its contents if it is a
     directory, ~/tlash is the place for user settings like aliases for
     default options (for example redefining the 'commit' alias) or
     setting variables to the name of commonly used versions.

In the future, it will also contain what you contributed :)

It is a complementary solution to aba, in that it is a dirty shell
script solution to the problems the mythical itla will solve one day.
It is also complementary in the sense that more elaborate commands
(new features) should probably be done on aba, while tlash would focus
on convenience.

Yes it is ugly, evil, and all the rest. But I find it useful and I think
other people will find it useful too. Even if some person will probably
want my head for reducing the prospects of his pet macro language in the
tla community by providing a hackish solution to a similar problem.

Oh, and yes, jblack, please merge :)

                                                            -- ddaa

reply via email to

[Prev in Thread] Current Thread [Next in Thread]