SquircleSpace / shcl

SHell in Common Lisp
Apache License 2.0
318 stars 17 forks source link

Can alias expansion be replaced with builtins? #6

Closed SquircleSpace closed 6 years ago

SquircleSpace commented 6 years ago

I wonder... now that we have good support for builtins, can aliases just be builtins that happen to defer their work to another function?

SquircleSpace commented 6 years ago

Not without going against POSIX:

After a token has been delimited, but before applying the grammatical rules in Shell Grammar , a resulting word that is identified to be the command name word of a simple command shall be examined to determine whether it is an unquoted, valid alias name.

Alias expansion should only happen for unquoted command names.