-
Notifications
You must be signed in to change notification settings - Fork 82
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
[Search directory] fix quick directory change for hidden directories #178
Conversation
Fix for #171 by changing the regex to optionally include `.` before the required `/` when deciding not to prepend `./` Result: `.config` -> `./.config` `/etc/foo` -> `/etc/foo` `./Desktop/bar` -> `./Desktop/bar`
Clean up comments to match new behavior.
I'd have added tests but the machine I'm on is currently locked at |
./
regex to make .
optional and /
always required
Thanks for the PR! |
Happy to help! |
Co-authored-by: Kid <[email protected]>
Co-authored-by: Kid <[email protected]>
Co-authored-by: Kid <[email protected]>
Sorry for the delay. This is on my radar but I've been busy or sick. I'll get this merged eventually |
No worries, take care of yourself! I have a fork (and am stuck on an older |
Something is off. The plugin doesn't prepend ./ anymore when there is a commandline token. E.g. if you start typing in Doc and you select Documents, you'd expect ./Documents but it outputs Documents. |
Ahh good catch! It looks like when nothing is typed, both I wonder if it might be better to do something like |
I think it might be missing |
If there are two tokens, what is the expectation of completing a directory? Activation happens where the
Is the expectation that it should complete as
|
There used to be a |
Yeah, this was the old approach. I forgot why we changed it. I'd be open to going back and just append a / to all selected directories. It be a little un-performant if selecting tons of results, but that should be rare @kidonng any thoughts?
I only wanted to prepend ./ to the directory for the purposes of when the user was looking for exactly one folder to cd to (if you hit enter when the only token is ./directory, it changes to directory). So no. And we can't just do
Good catch! Thanks! |
Actually, ~ can expand to |
I posted that comment because I did some tests by hand. But perhaps I should give it another shot and post the results here. |
My previous comment is incorrect because the @Laptop765 sorry for the misguidance. Please revert my suggestions. After that the PR looks good. |
"The old approach" never entered the codebase and stayed at the original PR. No need to revert since we have no issues with current approach (code is a little broken though). |
Ok sorry for the delay. I figured out a good way to fix this. Unfortunately, it's gonna be a decent amount of work so probably better if I start a new PR. Thanks for your hard work @Laptop765 and @kidonng |
Fixes #171 by making
.
optional but/
required when deciding not to prepend./
.