mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 23:48:09 +01:00
Make the output of the alias built-in POSIX-compliant: Drop the leading 'alias'
and suppress printing the trailing space which is added for internal purposes.
This commit is contained in:
parent
2989a67790
commit
0de913c328
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190270
@ -203,8 +203,13 @@ aliascmd(int argc, char **argv)
|
||||
for (i = 0; i < ATABSIZE; i++)
|
||||
for (ap = atab[i]; ap; ap = ap->next) {
|
||||
if (*ap->name != '\0') {
|
||||
out1fmt("alias %s=", ap->name);
|
||||
out1fmt("%s=", ap->name);
|
||||
/* Don't print the space added
|
||||
* above. */
|
||||
v = ap->val + strlen(ap->val) - 1;
|
||||
*v = '\0';
|
||||
out1qstr(ap->val);
|
||||
*v = ' ';
|
||||
out1c('\n');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user