Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
User Commands (a - b) alias(1)
NAME
alias -Defines and lists aliases
SYNOPSIS
alias [-tx][name[=value ...]]
FLAGS
-t Sets or lists tracked aliases.
-x Sets or prints exported aliases.
DESCRIPTION
The alias command with no arguments prints the list of aliases in the form name=value on stan-
dard output, where name is the name of an alias and value is the current definition of that alias.
If a name and value of the form name=value are specified an alias is defined for each name
whose value is given.
A trailing space in value causes the next word to be checked for alias substitution.
The -t flag is used to set and list tracked aliases. The value of a tracked alias is the full pathname
corresponding to the given name. The value becomes undefined when the value of PATH is
reset but the aliases remained tracked. If the -t flag is not specified, the name and value of the
alias is printed for each name in the argument list for which no value is given.
The -x flag is used to set or print exported aliases. An exported alias is defined for scripts
invoked by name.
EXAMPLES
1. The following command lists all of the aliases in the current shell.
alias
EXIT VALUES
Exit status is nonzero if a name is given without a value and no alias was defined.
NOTES
The alias command is a shell built-in command. It differs from the regular commands in that it
does not open a new shell process when it executes.
A general discussion of shell built-in commands and a list of the OSS shell built-in commands
are in the reference page for sh(1).
RELATED INFORMATION
Commands: sh(1), unalias(1).
527188-007 Hewlett-Packard Company 1−5