Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tag of dustin@spy.net--bindirs/bindirs--osx-home--1.0--patch-10
(automatically generated log message)
- Loading branch information
Dustin Sallings
committed
Mar 26, 2004
1 parent
3093fb9
commit dfc5b1b
Showing
255 changed files
with
3,785 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Mar 25 23:14:21 2004 2576.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:54 2003 6096.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:54 2003 6096.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:54 2003 6096.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dsallings@2wire.com> Thu Dec 18 10:28:20 2003 790.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:54 2003 6096.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:54 2003 6096.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:54 2003 6096.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:54 2003 6096.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:54 2003 6096.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:54 2003 6096.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:54 2003 6096.18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:54 2003 6096.19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:54 2003 6096.20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.23 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.26 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.29 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.36 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.45 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.46 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.47 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.49 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.51 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.56 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.57 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.61 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.62 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dsallings@2wire.com> Thu Jan 8 15:07:17 2004 2832.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Nov 13 00:49:55 2003 6096.63 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dsallings@2wire.com> Thu Dec 18 10:28:20 2003 790.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dsallings@2wire.com> Thu Dec 18 10:37:37 2003 27463.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Mar 25 23:08:01 2004 2366.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Mar 25 23:08:01 2004 2366.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Mar 25 23:14:43 2004 2580.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Mar 25 23:16:36 2004 2827.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Mar 25 23:16:36 2004 2827.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Mar 25 23:16:36 2004 2827.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Mar 25 23:16:36 2004 2827.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Mar 25 23:16:36 2004 2827.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Mar 25 23:17:00 2004 2832.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dustin Sallings <dustin@spy.net> Thu Mar 25 23:17:00 2004 2832.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
CREDITS (in reverse alphabetical order) | ||
|
||
Gergely Nagy | ||
* Improved portability (especially to Dash) | ||
* Contributed auto-register-archive | ||
|
||
Jan Hudec | ||
* Fixed space handling | ||
* Made it easy to install aba anywhere with a simple symlink | ||
* Made it possible to change the alias character from ^ into anything else | ||
* Added the ability to disable alias expansion | ||
* Prevented $ from being interpreted in alias expansion | ||
* Added helper functions | ||
* Added commands | ||
|
||
Johannes Martin Berg | ||
* Added "export" command | ||
|
||
Aaron Bentley | ||
* Originally threw this script together | ||
|
||
|
||
arch-tag: CREDITS by Aaron Bentley (19:31 Feb 12 2004) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
aba | ||
=== | ||
A while back, there was a suggestion that we make arch extendable with | ||
shell scripts. I thought the idea was neat, but Tom was having none | ||
of it. He felt that we could just write wrappers around tla to achive | ||
the same effect. | ||
|
||
Well, I think he was right. aba is a stupid-simple arch wrapper I | ||
wrote, which I have named, with all due humility, Aaron Bentley's Arch. | ||
|
||
You can use it to add new commands, set default options for any command, and | ||
create short aliases for long tla archive/category/version/revision names. | ||
|
||
Installing aba | ||
============== | ||
cd to ~/bin or /usr/local/bin | ||
Create a symlink (ln -s) to the aba script | ||
|
||
Why that works | ||
============== | ||
The main script looks for default options in <installdir>/options and | ||
~/.aba/options. Then it looks for files in <installdir>/commands and | ||
~/.aba/commands, and executes them if they exist. Otherwise, it executes | ||
tla. It finds <installdir> by looking at its $0, resolving it if it's | ||
a symlink. So it can be installed by just linking somewhere in path. | ||
|
||
Command Scripts | ||
=============== | ||
To list available scripts, type "aba help". This lists both tla and aba | ||
commands. | ||
|
||
Technically, command scripts should support the following arguments: | ||
exec $* Does whatever the script does | ||
exec -h Prints brief help | ||
exec -H Prints detailed help | ||
desc one-liner description of the script's function | ||
|
||
Non-interactive commands should normally pipe their output through $ABAFILTER. | ||
|
||
But I find it's easier to just copy aba/skel-command, and follow the comments. | ||
|
||
Default Options | ||
=============== | ||
Both tla commands and command scripts are executed with the options in the | ||
appropriate options file prepended. Options files contain only the default | ||
options desired. Aliases are treated as separate commands. The filename | ||
should be the same as the command they are for. | ||
|
||
An example is provided that prepends '--diffs' to 'what-changed'. | ||
|
||
Aliases | ||
======= | ||
Aliases can be used to reduce the amount of typing required by certain | ||
commands. Aliases can be defined in ~/.aliases like so: | ||
|
||
tom=lord@emf.net--2004/tla--devo--1.2 | ||
|
||
Or you can use "aba alias" to list or add aliases | ||
|
||
They can then be used on the command line like this: | ||
aba get ^tom--patch-35 | ||
(the ^ can be overridden by defining an alias | ||
aliaschar=<whatever-character-you-want>) | ||
If you need to inhibit alias processing, prepend the character twice -- ie. | ||
^^. Aliases are disabled completely when you define aliaschar to empty. | ||
|
||
While the intended use for aliases is to reduce the number of branch names | ||
typed, alias expansion is applied to all command arguments, so you can get | ||
creative with them if you like. Please don't put anything other than simple | ||
variable assignments in the file. Pretty please. | ||
|
||
Filtering output | ||
=============== | ||
aba can optionally pass its output through a filter. To select this filter, | ||
export a variable named "ABAFILTER", with the command to be used. An obvious | ||
example would be export ABAFILTER="aba colorize", but less, more and other | ||
output filters can be used. | ||
|
||
Interactive aba commands (e.g. those that may invoke $EDITOR) are not filtered. | ||
All tla commands are filtered, but $EDITOR is unset before invoking tla with | ||
a filter. | ||
|
||
aba's web site | ||
============== | ||
Check out all the latest info, screenshots and Winamp themes at the web site: | ||
http://sourcecontrol.net/~abentley/aba.php | ||
|
||
Comments, suggestions, and scripts are welcome. | ||
|
||
Aaron | ||
|
||
Aaron Bentley | ||
abentley@panoramicfeedback.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
#!/bin/sh | ||
# Copyright (C) 2004 Aaron Bentley | ||
# | ||
# See the file "COPYING" for further information about | ||
# the copyright and warranty status of this work. | ||
|
||
readlink_qualify () { | ||
case $2 in | ||
/*) readlink_f "$2";; | ||
*) readlink_f "$1/$2";; | ||
esac | ||
} | ||
|
||
readlink_f () { | ||
if [ -h "$1" ]; then | ||
readlink_qualify `dirname -- "$1"` `readlink "$1"` | ||
else | ||
echo "$1"; | ||
fi | ||
} | ||
|
||
# Get directory where this script resides -- allows systemwide installation. | ||
test -z "$abadir" -a -f "$HOME/.aba/aba-lib" && abadir="$HOME/.aba" | ||
test -z "$abadir" && abadir=$(dirname $(readlink_f "$0")) | ||
test -f "$abadir/aba-lib" || { | ||
echo "* Can't find aba-lib. Please set abadir to wherever it resides." >&2 | ||
exit 1 | ||
} | ||
export abadir | ||
abaname=$(basename $0) | ||
export abaname | ||
|
||
cmd=$1 | ||
[ -z "$cmd" ] || shift | ||
if tmp=`tla tree-root 2>/dev/null`; then treeroot=$tmp; fi | ||
|
||
if [ -n "$treeroot" -a -f "$treeroot/{arch}/++options/$cmd" ]; then | ||
prefix=`cat "$treeroot/{arch}/++options/$cmd"` | ||
elif [ -f ~/.aba/options/$cmd ]; then | ||
prefix=`cat ~/.aba/options/$cmd` | ||
elif [ -f "$abadir/options/$cmd" ]; then | ||
prefix=`cat "$abadir/options/$cmd"` | ||
fi | ||
|
||
if [ -f ~/.aba/aliases ]; then | ||
aliaschar=$(grep '^[ ]*aliaschar=.*' <~/.aba/aliases) | ||
eval "$aliaschar" # So we honor quoting | ||
aliaschar=${aliaschar:-^} # With zsh's extended globbing, ^ is no good choice. | ||
fi | ||
|
||
if [ -n "$aliaschar" ]; then | ||
case $aliaschar in | ||
\*) | ||
echo 'Aliaschar "*" '"won't work." >&2 | ||
exit 1;; | ||
\[|\]|.|^|\\) | ||
prepare_alias () { | ||
sed "s:[\$]:\\\\\$:g;s:\\$aliaschar:\$:g" <<EOS | ||
$1 | ||
EOS | ||
} ;; | ||
$) | ||
prepare_alias () { | ||
echo "$1" | ||
} ;; | ||
*) | ||
prepare_alias () { | ||
sed "s:[\$]:\\\\\$:g;s:$aliaschar:\$:g" <<EOS | ||
$1 | ||
EOS | ||
} ;; | ||
esac | ||
|
||
# This runs in subshell due to round brackets. | ||
expand_alias () ( | ||
. ~/.aba/aliases | ||
eval "printf '%s' \"$(prepare_alias "$1")\"" | ||
) | ||
|
||
# Spacewise correct expand-aliases, inline | ||
# Well, actualy it's not correct for arguments that are expanded, but | ||
# I don't know how to do that (command-substitution is not correct). | ||
for arg; do | ||
shift | ||
case $arg in | ||
$aliaschar$aliaschar*) | ||
set -- "$@" "$arg";; | ||
*$aliaschar*) | ||
arg=$(expand_alias "$arg") | ||
set -- "$@" "$arg";; | ||
*) set -- "$@" "$arg";; | ||
esac | ||
done | ||
fi | ||
|
||
if [ -x ~/.aba/commands/$cmd ] && [ ! -d ~/.aba/commands/$cmd ]; then | ||
# echo ~/.aba/commands/$cmd exec $prefix "$@" | ||
~/.aba/commands/$cmd exec $prefix "$@" | ||
elif [ -x "$abadir/commands/$cmd" ] && [ ! -d ~/.aba/commands/$cmd ]; then | ||
# echo "$abadir/commands/$cmd" exec $prefix "$@" | ||
"$abadir/commands/$cmd" exec $prefix "$@" | ||
else | ||
# echo tla $cmd $prefix "$@" | ||
if [ -n "$ABAFILTER" ]; then | ||
unset EDITOR | ||
export EDITOR | ||
tla $cmd $prefix "$@" | $ABAFILTER | ||
else | ||
tla $cmd $prefix "$@" | ||
fi | ||
fi | ||
# arch-tag: aba by Aaron Bentley (12:14 Jan 15, 2004) |
Oops, something went wrong.