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 directory check for folders with spaces #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ericwrice
Copy link

Issue:

I was not able to use zoxide in clink to navigate to a directory that contains a space, because usually words separated by spaces are keywords used for matching.

For example:

> cd "Test folder"
zoxide: no match found

Solution

The os.isdir() check failed when the string contained double quotes, so they were instead treated as keywords that needed to be matched. Tested on separate Windows 10 and 11 machines. The previous example now navigates to the folder as expected with regular cd, and keyword matching multiple words is still ok.

@shunsambongi
Copy link
Owner

If there is an issue with argument parsing, it should probably be fixed more upstream at https://chrisant996.github.io/clink/clink.html#string.explode which is used to parse the args

https://github.com/shunsambongi/clink-zoxide/blob/master/zoxide.lua#L127

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