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

Zoxide related features #506

Merged
merged 4 commits into from
Apr 3, 2024
Merged

Zoxide related features #506

merged 4 commits into from
Apr 3, 2024

Conversation

chrjabs
Copy link
Contributor

@chrjabs chrjabs commented Mar 11, 2024

This pull request implements some features related to zoxide:

One question related to the debug assertion introduced here: this is required for the zoxide update to work correctly, but will this always hold? I am confident that this holds when coming from change_directory::change_directory, but the function is also called from open_file::open, where I am not entirely sure.

before checking the zoxide database, check if the query is a directory
that can be navigated to as by `:cd`
also interpret `~` and `-` correctly
Add new config option `zoxide_update` with default false. When manually
enabled, all directory navigation (via manually navigating or `:cd` and
`:z`) will update the `zoxide` database.
Since navigation via `:z` always updates the database, ensure that it
doesn't update it twice.
support for `:zi <args>` where arguments are used to prefilter the
matches provided in the interactive zoxide prompt
note: only aliases that do not contain spaces can be used with arguments
since either the entire command or only the first word are checked
against the aliases
@kamiyaa
Copy link
Owner

kamiyaa commented Apr 3, 2024

function is also called from open_file::open, where I am not entirely sure.
This one should be fine because its taken from entry.file_path()

@kamiyaa kamiyaa merged commit d949668 into kamiyaa:main Apr 3, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants