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

fix: use builtin instead of command #3246

Closed
wants to merge 1 commit into from
Closed

fix: use builtin instead of command #3246

wants to merge 1 commit into from

Conversation

carlosala
Copy link

@carlosala carlosala commented Dec 5, 2023

Hey!
Switching from command to builtin. In zsh the keyword command does not resolve to builtin shell commands, only to binaries in the fs.
Thanks!

Fixes #3247

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to break all non-zsh shells, which would make it not the right fix.

@ljharb
Copy link
Member

ljharb commented Dec 5, 2023

hmm, actually it's when i omit -r that it doesn't do what i expect; with -r it might be correct. I'll keep investigating.

@ljharb
Copy link
Member

ljharb commented Dec 5, 2023

in ksh, builtin hash -r produces:

builtin: hash: restricted name
builtin: -r: not found

and dash doesn't have builtin at all.

Copy link

@grousk grousk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No errors while starting /usr/bin/zsh while these changes made for me.

@ljharb ljharb marked this pull request as draft December 5, 2023 20:26
@ljharb ljharb closed this in d86f270 Dec 6, 2023
@ljharb
Copy link
Member

ljharb commented Dec 6, 2023

Thanks for the contribution; I went with a different approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nvm v0.39.6 regression on command hash
3 participants