withfig / autocomplete

IDE-style autocomplete for your existing terminal & shell
https://fig.io
MIT License
24.39k stars 5.4k forks source link

feat(z): include cwd folders in suggestions for zoxides `z` command #2300

Closed ScottRobinson03 closed 3 months ago

ScottRobinson03 commented 3 months ago

What

The existing spec for the z command includes folders of the cwd for rupa/z, but not zoxide's z. This PR adds autocomplete suggestions for zoxide's z command and therefore resolves aws/codewhisperer-command-line-discussions#114.

I also added icons as per the following:

:file_folder: ... = not in zoxide history, but in cwd/pwd :floppy_disk: ... = in zoxide history AND cwd/pwd :floppy_disk:/... = in zoxide history, but NOT cwd/pwd (notice the leading / in path)

Example: image

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.

image
withfig-bot commented 3 months ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

withfig-bot commented 3 months ago

Overview

## src/z.ts: ### Info:
withfig-bot commented 3 months ago

Hello @ScottRobinson03, thank you very much for creating a Pull Request! Here is a small checklist to get this PR merged as quickly as possible:

Please add a 👍 as a reaction to this comment to show that you read this.

ScottRobinson03 commented 3 months ago

I have read the CLA Document and I hereby sign the CLA

grant0417 commented 3 months ago

Lgtm

grant0417 commented 3 months ago

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.