Commit Graph

628 Commits

Author SHA1 Message Date
Pruz cb3cbd52d9
Merge c677bbccf7 into ee594e6906 2026-08-11 12:57:09 +01:00
pcruz1905 c677bbccf7
fix: reject non-finite ranks when importing
Importing a z, fasd, z.lua or zsh-z data file whose rank is `inf`, `nan`,
or simply larger than f64 can hold silently wipes the rest of the database.

Ageing scales every rank by `0.9 * max_age / total`. One non-finite rank
makes the total infinite, so the factor is zero: every other directory is
multiplied down to 0.0, falls under the 1.0 threshold and is dropped, while
the offending entry survives as NaN because none of the comparisons against
it hold. Importing four directories where one has an `inf` rank leaves a
single NaN entry behind, and the command still exits 0.

The NaN then keeps the total NaN, `total_age > max_age` is never true again,
and the database stops ageing for good.

The last_accessed field is already validated by virtue of parsing as u64, so
do the same for the rank and reject it with the usual line-numbered error.
Ageing also drops non-finite ranks now, so a database that was already hit
by this recovers instead of staying stuck.
2026-08-11 12:56:16 +01:00
dependabot[bot] ee594e6906
Bump taiki-e/install-action from 2.85.5 to 2.85.10 (#1278)
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.85.5 to 2.85.10.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/v2.85.5...v2.85.10)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.85.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-11 00:23:35 +05:30
dependabot[bot] b4349d77d1
Bump Swatinem/rust-cache from 2.9.1 to 2.9.2 (#1279)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.9.1 to 2.9.2.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/v2.9.1...v2.9.2)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-version: 2.9.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-11 00:23:27 +05:30
dependabot[bot] 6d6066dd25
Bump taiki-e/install-action from 2 to 2.85.5 (#1275)
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2 to 2.85.5.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/v2...v2.85.5)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.85.5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 05:27:15 +05:30
developic cf086b057d
Fish: repaint the prompt when exiting without selecting (#1257) 2026-07-20 17:35:29 +05:30
Ajeet D'Souza 670bdf21b9 Nushell: handle symlinked directories 2026-07-13 15:36:47 +05:30
Rayan Salhab 1f484a4e34
Fix MSYS2 cygpath pwd substitution (#1260)
---------

Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com>
Co-authored-by: Ajeet D'Souza <98ajeet@gmail.com>
2026-07-07 04:39:13 +05:30
Ajeet D'Souza f84f9a3e1d Fix link in CHANGELOG 2026-07-04 18:10:42 +05:30
Ajeet D'Souza a603fc5d9c chore(release): v0.10.0 2026-07-04 18:03:56 +05:30
Ajeet D'Souza cb991a72f9 Bash: don't add to the database when history is disabled 2026-07-04 17:36:07 +05:30
Ajeet D'Souza 7c1395a116 Remove .deepsource.toml 2026-07-04 17:17:02 +05:30
Ajeet D'Souza 63ef5518e2 Zsh: check directory existence using cd 2026-07-04 17:11:47 +05:30
Ajeet D'Souza d0a6843d2b Bash/POSIX: check directory existence using cd 2026-07-04 15:51:04 +05:30
Ajeet D'Souza ad5ea87783 Nushell: complete only directories for `z` 2026-07-01 00:27:48 +05:30
Ajeet D'Souza b4d216fa43 Remove ASDF 2026-06-30 17:38:06 +05:30
Ajeet D'Souza 84bd26ebe3 nu: export functions 2026-06-30 16:37:23 +05:30
Ajeet D'Souza efa22f644a tcsh: preserve any existing `precmd` alias 2026-06-30 12:09:25 +05:30
Ajeet D'Souza 6f79755f1a fish: display and run the selected command in Space-Tab 2026-06-30 11:22:00 +05:30
Ajeet D'Souza 7a2094a59e import should skip excluded directories 2026-06-30 11:11:59 +05:30
Ajeet D'Souza daa5c98112 Bash/Fish/Zsh: avoid drawing a new line when Space-Tab completion finds no matches 2026-06-30 02:47:05 +05:30
Ajeet D'Souza ed9a035a26 Fish: record Space-Tab selected directory in history 2026-06-30 02:15:25 +05:30
Ajeet D'Souza 8e47b56895 Update CHANGELOG 2026-06-30 01:58:51 +05:30
Ajeet D'Souza a97f239292 Bash: avoid blanking the prompt when cancelling interactive completions 2026-06-30 01:46:13 +05:30
Ajeet D'Souza e4b82c0598 Zsh: avoid trailing space when cancelling interactive completions 2026-06-30 01:32:55 +05:30
Ajeet D'Souza faa8df63f3 Enable trusted publishing 2026-06-30 00:04:11 +05:30
dependabot[bot] 8caffa1b57
Bump actions/checkout from 6 to 7 (#1251)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-23 07:30:27 +05:30
Puneet Dixit c8a47a068b
Skip zsh doctor in non-interactive shells (#1241)
Co-authored-by: Puneet Dixit <236133619+puneetdixit200@users.noreply.github.com>
Co-authored-by: Ajeet D'Souza <98ajeet@gmail.com>
2026-05-22 00:13:25 +05:30
Ajeet D'Souza cff57b7734
Remove nix dependency (#1237) 2026-05-12 14:22:25 +05:30
Ajeet D'Souza b151e6da3d
pwsh: Use fully qualified names when invoking cmdlets (#1236) 2026-05-12 05:12:30 +05:30
Ajeet D'Souza 1683e7b8ed
import: auto-detect databases; add Atuin support (#1232) 2026-05-11 00:24:43 +05:30
dependabot[bot] 0cc031e98e
Bump softprops/action-gh-release from 2 to 3 (#1220)
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2 to 3.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2...v3)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-09 04:00:24 +05:30
dependabot[bot] 67ca1bc959
Bump cachix/cachix-action from 16 to 17 (#1202)
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from 16 to 17.
- [Release notes](https://github.com/cachix/cachix-action/releases)
- [Commits](https://github.com/cachix/cachix-action/compare/v16...v17)

---
updated-dependencies:
- dependency-name: cachix/cachix-action
  dependency-version: '17'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-24 03:50:23 +05:30
Bruno Verachten 4f04fd4167
ci: add riscv64 to release build matrix (#1201)
---------

Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Co-authored-by: Ajeet D'Souza <98ajeet@gmail.com>
2026-03-23 21:04:59 +05:30
dependabot[bot] f74ed040fe
Bump actions/upload-artifact from 6 to 7 (#1190)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-22 03:45:35 +05:30
dependabot[bot] 108c41ac82
Bump Swatinem/rust-cache from 2.8.2 to 2.9.1 (#1196)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.8.2 to 2.9.1.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/v2.8.2...v2.9.1)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-version: 2.9.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-17 01:49:29 +05:30
Ajeet D'Souza 61f19a60d9 Update README 2026-03-05 11:11:54 +05:30
Ajeet D'Souza a970320caf
Update README 2026-03-05 08:02:31 +05:30
dependabot[bot] 7e4cbb8380
Bump actions/checkout from 5 to 6 (#1191)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 03:32:43 +05:30
Ajeet D'Souza fb1495b0ad
Handle prompts ending in space (#1189) 2026-03-01 15:32:40 +05:30
Ajeet D'Souza a461c9585f Update README 2026-03-01 14:02:20 +05:30
Helmut K. C. Tessarek e10ebcc2bd
ci: add workflow to publish to crates.io (#1169)
Thanks!
2026-03-01 13:02:36 +05:30
Chawye Hsu f07a76e115
pwsh: handling `z ~` and `z` separately (#1161)
* pwsh: handling `z ~` and `z` separately

This patch enables the capability of navigating to the current user's home
directory with `z` when cwd is on a PSDrive that does not have a definition
of the `HOME` location.

Context: The fact that `~` can be counterintuitive on PowerShell, as it's
relative to the cwd, **and its value is defined with a `.Home` property of
cwd's PSProvider\[1]. Not all PSProviders however define this property, leaving
that sometimes you cannot navigate to the undefined `HOME` location with `~`.

To validate this, you can use `Get-PSDrive` to iterate your PSDrives and see
which providers define a `Home` property. On Windows,

```plain
Get-PSDrive C,HKLM | select Name,{$_.Provider.Name},{$_.Provider.Home}

Name $_.Provider.Name $_.Provider.Home
---- ---------------- ----------------
C    FileSystem       C:\Users\<username>
HKLM Registry
```

or on Linux/macOS,

```plain
Get-PSDrive /,Function | select Name,{$_.Provider.Name},{$_.Provider.Home}

Name     $_.Provider.Name $_.Provider.Home
----     ---------------- ----------------
/        FileSystem       /Users/<username>
Function Function
```

When cwd is on a PSDrive without a defined `HOME` location, the original
`Set-Location` alias `cd` in PowerShell handles this case by falling back
to the user's home directory when no argument is provided\[2], and when `~`
is explicitly provided, it results in an error.

```plain
PS C:\> Set-Location Function:
PS Function:\> cd ~
Home location for this provider is not set. To set the home location, call "(get-psprovider 'Function').Home = 'path'".
PS Function:\> cd
PS C:\Users\<username>\>
```

This patch implements the same behavior for `z` by handling `z ~` and `z` separately.

\[1]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_providers
\[2]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/set-location?#-path

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>

* No explicit case needed for ~

---------

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Co-authored-by: Ajeet D'Souza <98ajeet@gmail.com>
2026-03-01 12:43:50 +05:30
Ajeet D'Souza f3a07cd3d1 Update README.md 2026-02-19 01:13:09 +05:30
Ajeet D'Souza ce46915901 install.sh: Prefix global variables 2026-02-07 12:15:06 +05:30
Ajeet D'Souza d208a66f58 install.sh: early exit on error 2026-02-07 11:59:53 +05:30
Andrew Bradley d7458b756e
Support symlinks on Windows (#1149) 2026-02-02 11:07:36 +05:30
Ajeet D'Souza 9cdc6aa374 chore(release): v0.9.9 2026-01-31 13:12:16 +05:30
stringscut 52a716fed6
chore: improve code comments clarity (#1158)
Signed-off-by: stringscut <stringscut@outlook.jp>
2026-01-30 16:55:23 +05:30
Simon Olofsson 324b0d35e7
fish: clear existing completions before defining aliases (#1165)
Fish ships with built-in completions for common commands like `j` (share/completions/j.fish for autojump). These override zoxide's completions when using `--cmd j`. Clear them before defining aliases.
2026-01-30 16:54:27 +05:30