~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to fai/aba/commands/alias

  • Committer: Robert Collins
  • Date: 2005-09-13 10:46:27 UTC
  • mto: (147.2.6) (364.1.3 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: robertc@robertcollins.net-20050913104627-51f938950a907475
handle inaccessible sibling archives somewhat - note version-0 is still not handled

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# Copyright (C) 2004 Aaron Bentley
 
3
#
 
4
# See the file "COPYING" for further information about
 
5
# the copyright and warranty status of this work.
 
6
 
 
7
. "$abadir/aba-lib"
 
8
cmd_exec()
 
9
{
 
10
  if [ -z "$1" ]; then
 
11
    if [ -f ~/.aba/aliases ]; then
 
12
      cat ~/.aba/aliases
 
13
    fi
 
14
  else
 
15
    echo $1 >> ~/.aba/aliases
 
16
  fi
 
17
}
 
18
cmd_desc()
 
19
{
 
20
  echo '                       alias : add or view aliases'
 
21
}
 
22
cmd_help()
 
23
{
 
24
  echo "With no parameters, lists current aliases.  If an alias is provided, adds it."
 
25
}
 
26
cmd_ext_help()
 
27
{
 
28
  echo "Aliases should be of the form foo=bar, and should not include ^ or \$."
 
29
}
 
30
aba_run "$@"
 
31
# arch-tag: alias by Aaron Bentley (20:14 Feb 1, 2004)