Skip to content

Fix directory check for folders with spaces#9

Open
ericwrice wants to merge 1 commit into
shunsambongi:masterfrom
ericwrice:master
Open

Fix directory check for folders with spaces#9
ericwrice wants to merge 1 commit into
shunsambongi:masterfrom
ericwrice:master

Conversation

@ericwrice

Copy link
Copy Markdown

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
Copy Markdown
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