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: Accept 'cmd' shell without exe extension for windows #55

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

DanSM-5
Copy link
Contributor

@DanSM-5 DanSM-5 commented Nov 2, 2024

Current implementation requires you to forcefully use the exe extension as the value for shell, however it is possible to only use cmd without extension. Checking if shell contains cmd should be fine for ether case.

Copy link
Owner

@lukas-reineke lukas-reineke left a comment

Choose a reason for hiding this comment

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

Thanks

I think doing a find in string operation on every completion is unnecessarily expensive. shell is unlikely to ever change. Can you just move this into a variable at the top of the file that is evaluated once? Something like local is_cmd = string.find(vim.o.shell, "cmd")

@DanSM-5
Copy link
Contributor Author

DanSM-5 commented Nov 11, 2024

@lukas-reineke I've implemented your suggestions.

Copy link
Owner

@lukas-reineke lukas-reineke left a comment

Choose a reason for hiding this comment

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

Thanks

@lukas-reineke lukas-reineke merged commit 70a4354 into lukas-reineke:master Nov 12, 2024
1 of 3 checks passed
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.

2 participants