Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interp: alias and unalias panic #456

Closed
theclapp opened this issue Dec 16, 2019 · 3 comments
Closed

interp: alias and unalias panic #456

theclapp opened this issue Dec 16, 2019 · 3 comments

Comments

@theclapp
Copy link
Collaborator

interp.Runner.builtinCode panics on alias and unalias (among other things).

Any support planned for these? Any suggestions if not? PRs welcome?

@mvdan
Copy link
Owner

mvdan commented Dec 17, 2019

These are indeed TODOs; the larger issue is #97, though I wonder why the link there doesn't list alias and unalias.

A PR is welcome if you'd like to work on it. It should be pretty straightforward, as long as we add enough test cases for the possible scenarios where aliases are meant to work or be ignored. Otherwise we can leave this issue open as "help wanted".

@theclapp
Copy link
Collaborator Author

FWIW, the bash manpage says "The rules concerning the definition and use of aliases are somewhat confusing. [... A paragraph of somewhat confusing rules ...] For almost every purpose, aliases are superseded by shell functions." And you support function. So I'll just use that for now. Thanks.

@mvdan
Copy link
Owner

mvdan commented Dec 17, 2019

Yep, aliases are kind of weird. I only really use them for tiny interactive things :)

mvdan added a commit that referenced this issue Jan 16, 2020
It's pretty basic; for example, it doesn't support aliasing a name to
multiple words. We'll improve more edge cases in following commits.

Updates #456.
@mvdan mvdan closed this as completed in 0f82a9d Jan 16, 2020
@mvdan mvdan added this to the 3.1.0 milestone Feb 22, 2020
@mvdan mvdan changed the title alias and unalias panic interp: alias and unalias panic Feb 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants