6 alias, unalias - create or remove a pseudonym or shorthand for a
7 command or series of commands
8
9 SYNOPSIS
10 /usr/bin/alias [alias-name[= string...]]
11
12
13 /usr/bin/unalias alias-name...
14
15
16 /usr/bin/unalias -a
17
18
19 csh
20 alias [name [def]]
21
22
23 unalias pattern
24
25
26 ksh
27 alias [-tx] [name[= value]...]
28
29
30 unalias name...
31
32
33 unalias [-a]
34
35
36 ksh93
37 alias [-ptx] [name[= value]...]
38
39
40 unalias [-a] [name...]
41
42
43 DESCRIPTION
44 The alias and unalias utilities create or remove a pseudonym or
45 shorthand term for a command or series of commands, with different
46 functionality in the C-shell and Korn shell environments.
47
48 /usr/bin/alias
49 The alias utility creates or redefines alias definitions or writes the
50 values of existing alias definitions to standard output. An alias
51 definition provides a string value that replaces a command name when it
52 is encountered.
53
54
55 An alias definition affects the current shell execution environment and
62 The unalias utility removes the definition for each alias name
63 specified. The aliases are removed from the current shell execution
64 environment. The -a option removes all alias definitions from the
65 current execution environment.
66
67 csh
68 alias assigns def to the alias name. The assigned def is a list of
69 words that can contain escaped history-substitution metasyntax. name
70 is not allowed to be alias or unalias. If def is omitted, the alias
71 name is displayed along with its current definition. If both name and
72 def are omitted, all aliases are displayed.
73
74
75 Because of implementation restrictions, an alias definition must have
76 been entered on a previous command line before it can be used.
77
78
79 unalias discards aliases that match (filename substitution) pattern.
80 All aliases can be removed by `unalias *'.
81
82 ksh
83 alias with no arguments prints the list of aliases in the form
84 name=value on standard output. An alias is defined for each name whose
85 value is specified. A trailing space in value causes the next word to
86 be checked for alias substitution. The -t flag is used to set and list
87 tracked aliases. The value of a tracked alias is the full pathname
88 corresponding to the specified name. The value becomes undefined when
89 the value of PATH is reset but the aliases remained tracked. Without
90 the -t flag, for each name in the argument list for which no value is
91 specified, the name and value of the alias is printed. The -x flag is
92 used to set or print exported aliases. An exported alias is defined for
93 scripts invoked by name. The exit status is non-zero if a name is
94 specified, but no value, and no alias has been defined for the name.
95
96
97 The aliass specified by the list of names can be removed from the alias
98 list with unalias.
99
100 ksh93
101 alias creates or redefines alias definitions or writes the existing
102 alias definitions to standard output.
103
104
105 An alias definition provides a string value that replaces a command
106 name when the command is read. Alias names can contain any printable
107 character that is not special to the shell. If an alias value ends in a
108 SPACE or TAB, the word following the command name the alias replaces is
109 also checked to see whether it is an alias.
110
111
112 If no names are specified, the names and values of all aliases are
113 written to standard output. Otherwise, for each name that is specified,
114 and =value is not specified, the current value of the alias
115 corresponding to name is written to standard output. If =value is
116 specified, the alias name is created or redefined.
117
118
119 alias is built-in to the shell as a declaration command so that field
120 splitting and pathname expansion are not performed on the arguments.
121 Tilde expansion occurs on value. An alias definition only affects
122 scripts read by the current shell environment. It does not affect
123 scripts run by this shell.
124
125
126 unalias removes the definition of each named alias from the current
127 shell execution environment, or all aliases if -a is specified. It does
128 not affect any commands that have already been read and subsequently
129 executed.
130
131 OPTIONS
132 The following option is supported by unalias:
133
134 -a
135 Removes all alias definitions from the current shell execution
136 environment.
137
138
139 ksh
140 The following option is supported by alias:
141
142 -t
143 Sets and lists tracked aliases.
144
145
146 ksh93
147 The following options are supported by alias:
148
149 -p
150 Causes the output to be in the form of alias commands that can be
151 used as input to the shell to recreate the current aliases.
152
153
154 -t
155 Specifies tracked aliases.
156
157 Tracked aliases connect a command name to the command's pathname,
158 and are reset when the PATH variable is unset. The tracked
159 aliases feature is now obsolete.
160
161
162 -x
163 Ignored, this option is obsolete.
164
165
262 Successful completion.
263
264
265 alias
266 >0
267 One of the alias-name operands specified did not have an alias
268 definition, or an error occurred.
269
270
271 unalias
272 >0
273 One of the alias-name operands specified did not represent a
274 valid alias definition, or an error occurred.
275
276
277 ATTRIBUTES
278 See attributes(5) for descriptions of the following attributes:
279
280 csh, ksh
281
282
283
284 +--------------------+-------------------+
285 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
286 +--------------------+-------------------+
287 |Interface Stability | Committed |
288 +--------------------+-------------------+
289 |Standard | See standards(5). |
290 +--------------------+-------------------+
291
292 ksh93
293
294
295
296 +--------------------+-----------------+
297 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
298 +--------------------+-----------------+
299 |Interface Stability | Uncommitted |
300 +--------------------+-----------------+
301
302 SEE ALSO
303 csh(1), ksh(1), ksh93(1), shell_builtins(1), attributes(5), environ(5),
304 standards(5)
305
306
307
308 April 8, 2008 ALIAS(1)
|
6 alias, unalias - create or remove a pseudonym or shorthand for a
7 command or series of commands
8
9 SYNOPSIS
10 /usr/bin/alias [alias-name[= string...]]
11
12
13 /usr/bin/unalias alias-name...
14
15
16 /usr/bin/unalias -a
17
18
19 csh
20 alias [name [def]]
21
22
23 unalias pattern
24
25
26 ksh93
27 alias [-ptx] [name[= value]...]
28
29
30 unalias [-a] [name...]
31
32
33 DESCRIPTION
34 The alias and unalias utilities create or remove a pseudonym or
35 shorthand term for a command or series of commands, with different
36 functionality in the C-shell and Korn shell environments.
37
38 /usr/bin/alias
39 The alias utility creates or redefines alias definitions or writes the
40 values of existing alias definitions to standard output. An alias
41 definition provides a string value that replaces a command name when it
42 is encountered.
43
44
45 An alias definition affects the current shell execution environment and
52 The unalias utility removes the definition for each alias name
53 specified. The aliases are removed from the current shell execution
54 environment. The -a option removes all alias definitions from the
55 current execution environment.
56
57 csh
58 alias assigns def to the alias name. The assigned def is a list of
59 words that can contain escaped history-substitution metasyntax. name
60 is not allowed to be alias or unalias. If def is omitted, the alias
61 name is displayed along with its current definition. If both name and
62 def are omitted, all aliases are displayed.
63
64
65 Because of implementation restrictions, an alias definition must have
66 been entered on a previous command line before it can be used.
67
68
69 unalias discards aliases that match (filename substitution) pattern.
70 All aliases can be removed by `unalias *'.
71
72 ksh93
73 alias creates or redefines alias definitions or writes the existing
74 alias definitions to standard output.
75
76
77 An alias definition provides a string value that replaces a command
78 name when the command is read. Alias names can contain any printable
79 character that is not special to the shell. If an alias value ends in a
80 SPACE or TAB, the word following the command name the alias replaces is
81 also checked to see whether it is an alias.
82
83
84 If no names are specified, the names and values of all aliases are
85 written to standard output. Otherwise, for each name that is specified,
86 and =value is not specified, the current value of the alias
87 corresponding to name is written to standard output. If =value is
88 specified, the alias name is created or redefined.
89
90
91 alias is built-in to the shell as a declaration command so that field
92 splitting and pathname expansion are not performed on the arguments.
93 Tilde expansion occurs on value. An alias definition only affects
94 scripts read by the current shell environment. It does not affect
95 scripts run by this shell.
96
97
98 unalias removes the definition of each named alias from the current
99 shell execution environment, or all aliases if -a is specified. It does
100 not affect any commands that have already been read and subsequently
101 executed.
102
103 OPTIONS
104 The following option is supported by unalias:
105
106 -a
107 Removes all alias definitions from the current shell execution
108 environment.
109
110
111 ksh93
112 The following options are supported by alias:
113
114 -p
115 Causes the output to be in the form of alias commands that can be
116 used as input to the shell to recreate the current aliases.
117
118
119 -t
120 Specifies tracked aliases.
121
122 Tracked aliases connect a command name to the command's pathname,
123 and are reset when the PATH variable is unset. The tracked
124 aliases feature is now obsolete.
125
126
127 -x
128 Ignored, this option is obsolete.
129
130
227 Successful completion.
228
229
230 alias
231 >0
232 One of the alias-name operands specified did not have an alias
233 definition, or an error occurred.
234
235
236 unalias
237 >0
238 One of the alias-name operands specified did not represent a
239 valid alias definition, or an error occurred.
240
241
242 ATTRIBUTES
243 See attributes(5) for descriptions of the following attributes:
244
245 csh, ksh
246
247 +--------------------+-------------------+
248 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
249 +--------------------+-------------------+
250 |Interface Stability | Committed |
251 +--------------------+-------------------+
252 |Standard | See standards(5). |
253 +--------------------+-------------------+
254
255 ksh93
256
257 +--------------------+-----------------+
258 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
259 +--------------------+-----------------+
260 |Interface Stability | Uncommitted |
261 +--------------------+-----------------+
262
263 SEE ALSO
264 csh(1), ksh(1), ksh93(1), shell_builtins(1), attributes(5), environ(5),
265 standards(5)
266
267
268
269 February 9, 2021 ALIAS(1)
|