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
@ -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…
x
Reference in New Issue
Block a user