chore(release): v0.9.6

This commit is contained in:
Ajeet D'Souza 2024-09-19 16:11:06 +08:00
parent e9d5af3f95
commit 3d3267b4fd
5 changed files with 51 additions and 32 deletions

View File

@ -7,18 +7,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.9.6] - 2024-09-19
### Fixed
- Fish: `builtin abbr` doesn't work on older versions.
- Zsh: make `__zoxide_z_complete` available with `--no-cmd`.
## [0.9.5] - 2024-09-13 ## [0.9.5] - 2024-09-13
### Added ### Added
- zsh: improved `cd` completions. - Zsh: improved `cd` completions.
- Lazily delete excluded directories from the database. - Lazily delete excluded directories from the database.
- fish: detect infinite loop when using `alias cd=z`. - Fish: detect infinite loop when using `alias cd=z`.
- Installer: added flags for `--bin-dir`, `--man-dir`, `--arch`, and `--sudo`. - Installer: added flags for `--bin-dir`, `--man-dir`, `--arch`, and `--sudo`.
- Nushell: support for v0.94.0+. - Nushell: support for v0.94.0+.
- bash/fish/zsh: support for `z -- dir` style queries. - Bash/Fish/Zsh: support for `z -- dir` style queries.
- fish: improved Space-Tab completions. - Fish: improved Space-Tab completions.
- ksh: added support for the Korn shell. - Ksh: added support for the Korn shell.
### Changed ### Changed
@ -28,12 +35,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- zsh: Space-Tab completion repeating output multiple times when matching single - Zsh: Space-Tab completion repeating output multiple times when matching single
directory directory
- fish / Nushell / PowerShell: handle queries that look like args (e.g. `z -x`). - Fish / Nushell / PowerShell: handle queries that look like args (e.g. `z -x`).
- elvish: `z -` now works as expected. - Elvish: `z -` now works as expected.
- fish: generated shell code avoids using aliased builtins. - Fish: generated shell code avoids using aliased builtins.
- fish: `cd` command is now copied directly from - Fish: `cd` command is now copied directly from
`$__fish_data_dir/functions/cd.fish`. This should minimize the chances of an `$__fish_data_dir/functions/cd.fish`. This should minimize the chances of an
infinite loop when aliasing `cd=z`. infinite loop when aliasing `cd=z`.
- Symlinks not getting added to the database when `$_ZO_RESOLVE_SYMLINKS=0`. - Symlinks not getting added to the database when `$_ZO_RESOLVE_SYMLINKS=0`.
@ -43,7 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- zsh: improved Space-Tab completions. - Zsh: improved Space-Tab completions.
## [0.9.3] - 2024-02-13 ## [0.9.3] - 2024-02-13
@ -285,9 +292,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- `cd -` on fish shells. - `cd -` on Fish shells.
- `__zoxide_hook` no longer changes value of `$?` within `$PROMPT_COMMAND` on - `__zoxide_hook` no longer changes value of `$?` within `$PROMPT_COMMAND` on
bash. Bash.
### Removed ### Removed
@ -326,7 +333,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `$_ZO_EXCLUDE_DIRS` now supports globs. - `$_ZO_EXCLUDE_DIRS` now supports globs.
- `zoxide init` now defines `__zoxide_z*` functions that can be aliased as - `zoxide init` now defines `__zoxide_z*` functions that can be aliased as
needed. needed.
- Support for the [xonsh](https://xon.sh/) shell. - Support for the [Xonsh](https://xon.sh/) shell.
- `zoxide import` can now import from Autojump. - `zoxide import` can now import from Autojump.
### Changed ### Changed
@ -335,7 +342,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Clobber conflicting alias definitions in bash/fish/zsh/POSIX shells. - Clobber conflicting alias definitions in Bash/Fish/Zsh/POSIX shells.
### Removed ### Removed
@ -346,7 +353,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Bug in Fish init script - Bug in Fish init script.
## [0.4.2] - 2020-07-03 ## [0.4.2] - 2020-07-03
@ -371,7 +378,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- Support for powershell. - Support for PowerShell.
### Removed ### Removed
@ -399,7 +406,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- fish no longer `cd`s to the user's home when no match is found. - Fish no longer `cd`s to the user's home when no match is found.
## [0.3.1] - 2020-04-03 ## [0.3.1] - 2020-04-03
@ -439,7 +446,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Incorrect exit codes in `z` command on fish. - Incorrect exit codes in `z` command on Fish.
### Removed ### Removed
@ -452,7 +459,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `$_ZO_ECHO` to echo match before `cd`ing. - `$_ZO_ECHO` to echo match before `cd`ing.
- Minimal `ranger` plugin. - Minimal `ranger` plugin.
- PWD hook to only update the database when the current directory is changed. - PWD hook to only update the database when the current directory is changed.
- Support for bash. - Support for Bash.
- `migrate` subcommand to allow users to migrate from `z`. - `migrate` subcommand to allow users to migrate from `z`.
### Fixed ### Fixed
@ -466,11 +473,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `init` subcommand to remove dependency on shell plugin managers. - `init` subcommand to remove dependency on shell plugin managers.
- Support for `z -` command to go to previous directory. - Support for `z -` command to go to previous directory.
- `Cargo.lock` for more reproducible builds. - `Cargo.lock` for more reproducible builds.
- Support for the fish shell. - Support for the Fish shell.
### Fixed ### Fixed
- `_zoxide_precmd` overriding other precmd hooks on zsh. - `_zoxide_precmd` overriding other precmd hooks on Zsh.
## [0.1.1] - 2020-03-08 ## [0.1.1] - 2020-03-08
@ -492,7 +499,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- GitHub Actions pipeline to build and upload releases. - GitHub Actions pipeline to build and upload releases.
- Support for zsh. - Add support for Zsh.
[0.9.5]: https://github.com/ajeetdsouza/zoxide/compare/v0.9.4...v0.9.5 [0.9.5]: https://github.com/ajeetdsouza/zoxide/compare/v0.9.4...v0.9.5
[0.9.4]: https://github.com/ajeetdsouza/zoxide/compare/v0.9.3...v0.9.4 [0.9.4]: https://github.com/ajeetdsouza/zoxide/compare/v0.9.3...v0.9.4

2
Cargo.lock generated
View File

@ -1090,7 +1090,7 @@ dependencies = [
[[package]] [[package]]
name = "zoxide" name = "zoxide"
version = "0.9.5" version = "0.9.6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"assert_cmd", "assert_cmd",

View File

@ -10,7 +10,7 @@ name = "zoxide"
readme = "README.md" readme = "README.md"
repository = "https://github.com/ajeetdsouza/zoxide" repository = "https://github.com/ajeetdsouza/zoxide"
rust-version = "1.74.1" rust-version = "1.74.1"
version = "0.9.5" version = "0.9.6"
[badges] [badges]
maintenance = { status = "actively-developed" } maintenance = { status = "actively-developed" }

View File

@ -114,6 +114,16 @@ mod tests {
.stderr(""); .stderr("");
} }
#[apply(opts)]
fn fish_no_builtin_abbr(cmd: Option<&str>, hook: InitHook, echo: bool, resolve_symlinks: bool) {
let opts = Opts { cmd, hook, echo, resolve_symlinks };
let source = Fish(&opts).render().unwrap();
assert!(
!source.contains("builtin abbr"),
"`builtin abbr` does not work on older versions of Fish"
);
}
#[apply(opts)] #[apply(opts)]
fn fish_fish(cmd: Option<&str>, hook: InitHook, echo: bool, resolve_symlinks: bool) { fn fish_fish(cmd: Option<&str>, hook: InitHook, echo: bool, resolve_symlinks: bool) {
let opts = Opts { cmd, hook, echo, resolve_symlinks }; let opts = Opts { cmd, hook, echo, resolve_symlinks };

View File

@ -91,6 +91,12 @@ function {{ cmd }}i() {
__zoxide_zi "$@" __zoxide_zi "$@"
} }
{%- when None %}
{{ not_configured }}
{%- endmatch %}
# Completions. # Completions.
if [[ -o zle ]]; then if [[ -o zle ]]; then
__zoxide_result='' __zoxide_result=''
@ -126,7 +132,7 @@ if [[ -o zle ]]; then
function __zoxide_z_complete_helper() { function __zoxide_z_complete_helper() {
if [[ -n "${__zoxide_result}" ]]; then if [[ -n "${__zoxide_result}" ]]; then
# shellcheck disable=SC2034,SC2296 # shellcheck disable=SC2034,SC2296
BUFFER="{{ cmd }} ${(q-)__zoxide_result}" BUFFER="{{ cmd.unwrap_or("cd") }} ${(q-)__zoxide_result}"
__zoxide_result='' __zoxide_result=''
\builtin zle reset-prompt \builtin zle reset-prompt
\builtin zle accept-line \builtin zle accept-line
@ -135,16 +141,12 @@ if [[ -o zle ]]; then
fi fi
} }
\builtin zle -N __zoxide_z_complete_helper \builtin zle -N __zoxide_z_complete_helper
{%- if let Some(cmd) = cmd %}
[[ "${+functions[compdef]}" -ne 0 ]] && \compdef __zoxide_z_complete {{ cmd }} [[ "${+functions[compdef]}" -ne 0 ]] && \compdef __zoxide_z_complete {{ cmd }}
{%- endif %}
fi fi
{%- when None %}
{{ not_configured }}
{%- endmatch %}
{{ section }} {{ section }}
# To initialize zoxide, add this to your configuration (usually ~/.zshrc): # To initialize zoxide, add this to your configuration (usually ~/.zshrc):
# #