1UNALIAS(1P)                POSIX Programmer's Manual               UNALIAS(1P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       unalias — remove alias definitions
13

SYNOPSIS

15       unalias alias-name...
16
17       unalias -a
18

DESCRIPTION

20       The unalias utility shall remove the definition  for  each  alias  name
21       specified. See Section 2.3.1, Alias Substitution.  The aliases shall be
22       removed from the current shell execution environment; see Section 2.12,
23       Shell Execution Environment.
24

OPTIONS

26       The  unalias  utility  shall  conform to the Base Definitions volume of
27       POSIX.1‐2017, Section 12.2, Utility Syntax Guidelines.
28
29       The following option shall be supported:
30
31       -a        Remove all alias definitions from the current shell execution
32                 environment.
33

OPERANDS

35       The following operand shall be supported:
36
37       alias-name
38                 The name of an alias to be removed.
39

STDIN

41       Not used.
42

INPUT FILES

44       None.
45

ENVIRONMENT VARIABLES

47       The  following environment variables shall affect the execution of una‐
48       lias:
49
50       LANG      Provide a default value for  the  internationalization  vari‐
51                 ables  that are unset or null. (See the Base Definitions vol‐
52                 ume of POSIX.1‐2017, Section 8.2, Internationalization  Vari‐
53                 ables  for  the  precedence of internationalization variables
54                 used to determine the values of locale categories.)
55
56       LC_ALL    If set to a non-empty string value, override  the  values  of
57                 all the other internationalization variables.
58
59       LC_CTYPE  Determine  the  locale for the interpretation of sequences of
60                 bytes of text data as characters (for example, single-byte as
61                 opposed to multi-byte characters in arguments).
62
63       LC_MESSAGES
64                 Determine the locale that should be used to affect the format
65                 and contents  of  diagnostic  messages  written  to  standard
66                 error.
67
68       NLSPATH   Determine the location of message catalogs for the processing
69                 of LC_MESSAGES.
70

ASYNCHRONOUS EVENTS

72       Default.
73

STDOUT

75       Not used.
76

STDERR

78       The standard error shall be used only for diagnostic messages.
79

OUTPUT FILES

81       None.
82

EXTENDED DESCRIPTION

84       None.
85

EXIT STATUS

87       The following exit values shall be returned:
88
89        0    Successful completion.
90
91       >0    One of the alias-name operands  specified  did  not  represent  a
92             valid alias definition, or an error occurred.
93

CONSEQUENCES OF ERRORS

95       Default.
96
97       The following sections are informative.
98

APPLICATION USAGE

100       Since  unalias  affects  the current shell execution environment, it is
101       generally provided as a shell regular built-in.
102

EXAMPLES

104       None.
105

RATIONALE

107       The unalias description is based  on  that  from  historical  KornShell
108       implementations.  Known differences exist between that and the C shell.
109       The KornShell version was adopted to be consistent with all  the  other
110       KornShell features in this volume of POSIX.1‐2017, such as command line
111       editing.
112
113       The -a option is the equivalent of the unalias * form of  the  C  shell
114       and  is  provided  to  address  security concerns about unknown aliases
115       entering the environment of a user (or application) through the  allow‐
116       able implementation-defined predefined alias route or as a result of an
117       ENV file. (Although unalias could be used to  simplify  the  ``secure''
118       shell  script  shown  in the command rationale, it does not obviate the
119       need to quote all command names. An initial call to  unalias  -a  would
120       have to be quoted in case there was an alias for unalias.)
121

FUTURE DIRECTIONS

123       None.
124

SEE ALSO

126       Chapter 2, Shell Command Language, alias
127
128       The  Base  Definitions  volume  of POSIX.1‐2017, Chapter 8, Environment
129       Variables, Section 12.2, Utility Syntax Guidelines
130
132       Portions of this text are reprinted and reproduced in  electronic  form
133       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
134       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
135       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
136       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
137       event of any discrepancy between this version and the original IEEE and
138       The Open Group Standard, the original IEEE and The Open Group  Standard
139       is  the  referee document. The original Standard can be obtained online
140       at http://www.opengroup.org/unix/online.html .
141
142       Any typographical or formatting errors that appear  in  this  page  are
143       most likely to have been introduced during the conversion of the source
144       files to man page format. To report such errors,  see  https://www.ker
145       nel.org/doc/man-pages/reporting_bugs.html .
146
147
148
149IEEE/The Open Group                  2017                          UNALIAS(1P)
Impressum