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
feat(z): include cwd folders in suggestions for zoxides z
command
#2300
feat(z): include cwd folders in suggestions for zoxides z
command
#2300
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Overviewsrc/z.ts:Info: |
Hello @ScottRobinson03,
Please add a 👍 as a reaction to this comment to show that you read this. |
@@ -125,9 +125,12 @@ const zoxideCompletionSpec: Fig.Spec = { | |||
name: "directory", | |||
filterStrategy: "fuzzy", | |||
suggestCurrentToken: true, | |||
isVariadic: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opted to remove this isVariadic: true
since whilst the argument is strictly speaking variadic, the autocomplete for it is going to be wrong 99% of the time and so figured it's better to not give suggestions than give wrong suggestions.
I have read the CLA Document and I hereby sign the CLA |
Lgtm |
The issue with priority not working is likely history which will result in previously selected items to be at the top even when a high priority is set, this is something I will need to look into fixing but at the moment this should be fine. |
What
The existing spec for the
z
command includes folders of the cwd for rupa/z, but not zoxide'sz
. This PR adds autocomplete suggestions for zoxide'sz
command and therefore resolves aws/q-command-line-discussions#114.I also added icons as per the following:
📁 ... = not in zoxide history, but in cwd/pwd
💾 ... = in zoxide history AND cwd/pwd
💾/... = in zoxide history, but NOT cwd/pwd (notice the leading
/
in path)Example:
Known Issues:
For some reason I can't seem to consistently get all of zoxide's cwd suggestions above the non-zoxide cwd suggestions. I'm using the
priority
key to try and achieve this, but it doesn't seem to work here for some reason? Would appreciate assistance in debugging this.