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

ZSH integration fails with error "parse error near ()" #857

Closed
NachoVazquez opened this issue Nov 17, 2023 · 8 comments
Closed

ZSH integration fails with error "parse error near ()" #857

NachoVazquez opened this issue Nov 17, 2023 · 8 comments

Comments

@NachoVazquez
Copy link

The Problem

After running

eval "$(pkgx integrate)"

I get

/Users/nachovazquez/.zshrc << `source <(pkgx --shellcode)`
hook already integrated: ~/.bashrc
zsh: defining function based on alias `x'
zsh: parse error near `()'

Acceptance Criteria

ZSH should integrate correctly or provide an error message with a potential problem diagnosis.

@mxcl
Copy link
Member

mxcl commented Nov 17, 2023

oh ok, you already have an alias x I'm guessing?

I'll make it so the shellcode only defines x if it's not already taken.

mxcl added a commit that referenced this issue Nov 17, 2023
Note that this doesn’t change the behavior of the command not found handler, that should be a separate more involved fix.
@NachoVazquez
Copy link
Author

Thank you @mxcl !

mxcl added a commit that referenced this issue Nov 17, 2023
* Only define `x` if available; Refs #857
* Note that this doesn’t change the behavior of the command not found handler, that should be a separate more involved fix.
* Add test
@mxcl
Copy link
Member

mxcl commented Nov 18, 2023

I'll push out 1.1.1 today

@NachoVazquez
Copy link
Author

I'll push out 1.1.1 today

Fantastic!

@mxcl
Copy link
Member

mxcl commented Nov 18, 2023

Keeping this open as the shellcode should handle the “no x” scenario with a couple of minor changes, however the ref’d PR is sufficient to fix this issue.

@mxcl
Copy link
Member

mxcl commented Nov 20, 2023

Sorry for the delay, our build infra is choking since Saturday trying to push out 1.1.1.

@NachoVazquez
Copy link
Author

Thanks for the update. I'm looking forward to trying pkgxat to its fullest.

@mxcl
Copy link
Member

mxcl commented Jan 30, 2024

Forgot to close this.

@mxcl mxcl closed this as completed Jan 30, 2024
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

No branches or pull requests

2 participants