bk alias(7.3ce)             BitKeeper User's Manual            bk alias(7.3ce)

NAME
       bk alias - manage aliases for lists of components

SYNOPSIS
       bk alias [add|rm|set|new] [<options>] <name> [<component> ...]

   CREATING AN ALIAS
       bk alias new [-C] <name> <component> ...
       bk alias set [-C] <name> <component> ...

   ADDING COMPONENTS TO AN ALIAS
       bk alias add [-C] <name> <component> ...

   REMOVING AN ALIAS
       bk alias rm [-C] <name>

   REMOVING COMPONENTS FROM AN ALIAS
       bk alias rm [-C] <name> <component> ...

   REPLACING AN ALIAS
       bk alias set [-C] <name> <component> ...

   LIST ALL ALIASES
       bk alias [-r<rev>] [-hm] [-k] [-v]

   SHOW AN ALIAS
       bk alias [-r<rev>] [-hm] [-k] [-v] <name>

DESCRIPTION
       The  bk  alias  command  is  used  to  create,  modify, remove, or list
       aliases.  An alias is a symbolic name that resolves to a list of  other
       aliases  or  root keys for one or more components (aka sub-repositories
       in a product).

       Alias names are similar to C identifiers and must  match  this  regular
       expression:

           [A-Za-z][A-Za-z0-9_]*

       When creating, or adding to, an alias, how the components are specified
       and expanded is as follows:

       ./gcc    Any path that names a component means just that one component.
                The  path is relative to the current working directory; if the
                current working directory is not at the root  of  the  product
                then the sub-path to the current working directory is prefixed
                automatically.  The prefixed path is matched against the  list
                of  attached and committed components, i.e., specifying a path
                to a newly created but unattached component will result in  an
                error.
       <key>    A  root  key of a component is the same as specifying the path
                to that component.
       COMPILER Any name without a leading "./" is taken as another  alias  to
                be expanded recursively.

       When  adding a component to an alias, if the alias does not exist it is
       automatically created in the aliases file.

       When modifying an alias the command line can include '-' instead of the
       arguments  and  the  list of aliases to add or remove will be read from
       standard input instead.

PRE-DEFINED OR RESERVED ALIASES
       There are a number of predefined aliases.  Predefined aliases  may  not
       be modified and they may not be used as part of a user defined alias.

       .        This  context sensitive alias means the current repository, be
                it the product or a component.
       ALL      This alias means all components (as well as the product).   If
                you  try  and  expand ALL and there are missing components the
                expansion will fail.
       PRODUCT  This alias always means the product.
       THERE    This alias means all components and the product that are  cur-
                rently  present  in the nested collection.  If you do not care
                what the other side has, you just want to replicate it, then

                    $ bk clone -sTHERE bk://good-stuff/some-repo

       HERE     This is the same as THERE but it makes more sense for commands
                like so:

                    $ bk clone -sHERE . bk://good-stuff/have-mine

       add      Reserved name, conflicts with the "bk alias add" command.
       rm       Reserved name, conflicts with the "bk alias rm" command.
       set      Reserved name, conflicts with the "bk alias set" command.
       new      Reserved name, conflicts with the "bk alias new" command.

       The predefined aliases ALL, HERE, THERE, PRODUCT, are case insensitive,
       i.e., "here" and "HERE" mean the same thing.  In all  other  cases  the
       names are case sensitive.

OPTIONS
       -@<URL> When  changing  an  alias leads to changing what components are
               here, include <URL> in the list of places to look.
       -C      Normally, modifying the aliases database results in a changeset
               committing  that  change.   This  option suppresses the commit.
               Use this option when you wish to combine the alias  event  with
               other changes to the product.
       -h      (here)  Used when showing aliases; causes only aliases that are
               fully present to be listed.
       -k      (keys) Used when showing aliases; causes individual  components
               to be listed by their rootkeys instead of the current pathname,
               which is the default output.
       -m      (missing) Used when showing aliases; causes only  aliases  that
               are not fully present to be listed.
       -r<rev> Used  when  showing aliases; causes the aliases to be listed as
               of an older revision of the BitKeeper/etc/aliases file.
       -v      Used when showing aliases; causes aliases  to  be  expanded  to
               show  contents  using an indented list.  Adding more -v options
               expands to more levels.

EXAMPLES
       To create an alias that points to a named list of components:

           $ bk alias new COMPILER ./cmd/gcc ./cmd/as ./cmd/ld ./cmd/nm

       or, if you wish to type less:

           $ cd cmd
           $ bk alias new COMPILER ./gcc ./as ./ld ./nm

       To create a higher level alias that includes the debugger:

           $ bk alias new DEV-TOOLS ./gdb COMPILER

       List all aliases:

           $ bk alias
           COMPILER
           DEV-TOOLS

       Show an alias that contains another:

           $ bk alias DEV-TOOLS
           COMPILER
           ./cmd/gdb

       Expand an alias into paths:

           $ bk comps -sDEV-TOOLS
           ./cmd/as
           ./cmd/gcc
           ./cmd/gdb
           ./cmd/ld
           ./cmd/nm

       To remove a component from an alias:

           $ bk alias rm COMPILER ./cmd/nm

FILES
       The  aliases  database  is  a   flat   text   file   stored   in   Bit-
       Keeper/etc/aliases.   Any  components  that are specified as a path are
       stored internally as their root keys so that the alias will expand cor-
       rectly even if the specified component[s] is/are moved.

SEE ALSO
       bk clone
       bk comps
       bk glob
       bk id
       bk here

CATEGORY
       Nested

BitKeeper Inc                         1E1                      bk alias(7.3ce)