Skip to content

Commit 3d3267b

Browse files
committed
chore(release): v0.9.6
1 parent e9d5af3 commit 3d3267b

File tree

5 files changed

+51
-32
lines changed

5 files changed

+51
-32
lines changed

CHANGELOG.md

+30-23
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,25 @@ All notable changes to this project will be documented in this file.
77
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
99

10+
## [0.9.6] - 2024-09-19
11+
12+
### Fixed
13+
14+
- Fish: `builtin abbr` doesn't work on older versions.
15+
- Zsh: make `__zoxide_z_complete` available with `--no-cmd`.
16+
1017
## [0.9.5] - 2024-09-13
1118

1219
### Added
1320

14-
- zsh: improved `cd` completions.
21+
- Zsh: improved `cd` completions.
1522
- Lazily delete excluded directories from the database.
16-
- fish: detect infinite loop when using `alias cd=z`.
23+
- Fish: detect infinite loop when using `alias cd=z`.
1724
- Installer: added flags for `--bin-dir`, `--man-dir`, `--arch`, and `--sudo`.
1825
- Nushell: support for v0.94.0+.
19-
- bash/fish/zsh: support for `z -- dir` style queries.
20-
- fish: improved Space-Tab completions.
21-
- ksh: added support for the Korn shell.
26+
- Bash/Fish/Zsh: support for `z -- dir` style queries.
27+
- Fish: improved Space-Tab completions.
28+
- Ksh: added support for the Korn shell.
2229

2330
### Changed
2431

@@ -28,12 +35,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2835

2936
### Fixed
3037

31-
- zsh: Space-Tab completion repeating output multiple times when matching single
38+
- Zsh: Space-Tab completion repeating output multiple times when matching single
3239
directory
33-
- fish / Nushell / PowerShell: handle queries that look like args (e.g. `z -x`).
34-
- elvish: `z -` now works as expected.
35-
- fish: generated shell code avoids using aliased builtins.
36-
- fish: `cd` command is now copied directly from
40+
- Fish / Nushell / PowerShell: handle queries that look like args (e.g. `z -x`).
41+
- Elvish: `z -` now works as expected.
42+
- Fish: generated shell code avoids using aliased builtins.
43+
- Fish: `cd` command is now copied directly from
3744
`$__fish_data_dir/functions/cd.fish`. This should minimize the chances of an
3845
infinite loop when aliasing `cd=z`.
3946
- 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
4350

4451
### Changed
4552

46-
- zsh: improved Space-Tab completions.
53+
- Zsh: improved Space-Tab completions.
4754

4855
## [0.9.3] - 2024-02-13
4956

@@ -285,9 +292,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
285292

286293
### Fixed
287294

288-
- `cd -` on fish shells.
295+
- `cd -` on Fish shells.
289296
- `__zoxide_hook` no longer changes value of `$?` within `$PROMPT_COMMAND` on
290-
bash.
297+
Bash.
291298

292299
### Removed
293300

@@ -326,7 +333,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
326333
- `$_ZO_EXCLUDE_DIRS` now supports globs.
327334
- `zoxide init` now defines `__zoxide_z*` functions that can be aliased as
328335
needed.
329-
- Support for the [xonsh](https://xon.sh/) shell.
336+
- Support for the [Xonsh](https://xon.sh/) shell.
330337
- `zoxide import` can now import from Autojump.
331338

332339
### Changed
@@ -335,7 +342,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
335342

336343
### Fixed
337344

338-
- Clobber conflicting alias definitions in bash/fish/zsh/POSIX shells.
345+
- Clobber conflicting alias definitions in Bash/Fish/Zsh/POSIX shells.
339346

340347
### Removed
341348

@@ -346,7 +353,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
346353

347354
### Fixed
348355

349-
- Bug in Fish init script
356+
- Bug in Fish init script.
350357

351358
## [0.4.2] - 2020-07-03
352359

@@ -371,7 +378,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
371378

372379
### Added
373380

374-
- Support for powershell.
381+
- Support for PowerShell.
375382

376383
### Removed
377384

@@ -399,7 +406,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
399406

400407
### Fixed
401408

402-
- fish no longer `cd`s to the user's home when no match is found.
409+
- Fish no longer `cd`s to the user's home when no match is found.
403410

404411
## [0.3.1] - 2020-04-03
405412

@@ -439,7 +446,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
439446

440447
### Fixed
441448

442-
- Incorrect exit codes in `z` command on fish.
449+
- Incorrect exit codes in `z` command on Fish.
443450

444451
### Removed
445452

@@ -452,7 +459,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
452459
- `$_ZO_ECHO` to echo match before `cd`ing.
453460
- Minimal `ranger` plugin.
454461
- PWD hook to only update the database when the current directory is changed.
455-
- Support for bash.
462+
- Support for Bash.
456463
- `migrate` subcommand to allow users to migrate from `z`.
457464

458465
### Fixed
@@ -466,11 +473,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
466473
- `init` subcommand to remove dependency on shell plugin managers.
467474
- Support for `z -` command to go to previous directory.
468475
- `Cargo.lock` for more reproducible builds.
469-
- Support for the fish shell.
476+
- Support for the Fish shell.
470477

471478
### Fixed
472479

473-
- `_zoxide_precmd` overriding other precmd hooks on zsh.
480+
- `_zoxide_precmd` overriding other precmd hooks on Zsh.
474481

475482
## [0.1.1] - 2020-03-08
476483

@@ -492,7 +499,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
492499
### Added
493500

494501
- GitHub Actions pipeline to build and upload releases.
495-
- Support for zsh.
502+
- Add support for Zsh.
496503

497504
[0.9.5]: https://github.com/ajeetdsouza/zoxide/compare/v0.9.4...v0.9.5
498505
[0.9.4]: https://github.com/ajeetdsouza/zoxide/compare/v0.9.3...v0.9.4

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name = "zoxide"
1010
readme = "README.md"
1111
repository = "https://github.com/ajeetdsouza/zoxide"
1212
rust-version = "1.74.1"
13-
version = "0.9.5"
13+
version = "0.9.6"
1414

1515
[badges]
1616
maintenance = { status = "actively-developed" }

src/shell.rs

+10
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,16 @@ mod tests {
114114
.stderr("");
115115
}
116116

117+
#[apply(opts)]
118+
fn fish_no_builtin_abbr(cmd: Option<&str>, hook: InitHook, echo: bool, resolve_symlinks: bool) {
119+
let opts = Opts { cmd, hook, echo, resolve_symlinks };
120+
let source = Fish(&opts).render().unwrap();
121+
assert!(
122+
!source.contains("builtin abbr"),
123+
"`builtin abbr` does not work on older versions of Fish"
124+
);
125+
}
126+
117127
#[apply(opts)]
118128
fn fish_fish(cmd: Option<&str>, hook: InitHook, echo: bool, resolve_symlinks: bool) {
119129
let opts = Opts { cmd, hook, echo, resolve_symlinks };

templates/zsh.txt

+9-7
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ function {{ cmd }}i() {
9191
__zoxide_zi "$@"
9292
}
9393

94+
{%- when None %}
95+
96+
{{ not_configured }}
97+
98+
{%- endmatch %}
99+
94100
# Completions.
95101
if [[ -o zle ]]; then
96102
__zoxide_result=''
@@ -126,7 +132,7 @@ if [[ -o zle ]]; then
126132
function __zoxide_z_complete_helper() {
127133
if [[ -n "${__zoxide_result}" ]]; then
128134
# shellcheck disable=SC2034,SC2296
129-
BUFFER="{{ cmd }} ${(q-)__zoxide_result}"
135+
BUFFER="{{ cmd.unwrap_or("cd") }} ${(q-)__zoxide_result}"
130136
__zoxide_result=''
131137
\builtin zle reset-prompt
132138
\builtin zle accept-line
@@ -135,16 +141,12 @@ if [[ -o zle ]]; then
135141
fi
136142
}
137143
\builtin zle -N __zoxide_z_complete_helper
144+
{%- if let Some(cmd) = cmd %}
138145

139146
[[ "${+functions[compdef]}" -ne 0 ]] && \compdef __zoxide_z_complete {{ cmd }}
147+
{%- endif %}
140148
fi
141149

142-
{%- when None %}
143-
144-
{{ not_configured }}
145-
146-
{%- endmatch %}
147-
148150
{{ section }}
149151
# To initialize zoxide, add this to your configuration (usually ~/.zshrc):
150152
#

0 commit comments

Comments
 (0)