Commit Graph

177 Commits

Author SHA1 Message Date
Juhan280 5f0e47c5ee use fzf based sorting instead of nushell buitin 2026-07-02 02:15:12 +06:00
Juhan280 5844cc609a Merge branch 'main' into nushell_completion 2026-07-01 23:25:15 +06:00
Ajeet D'Souza ad5ea87783 Nushell: complete only directories for `z` 2026-07-01 00:27:48 +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 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 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
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 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
Juhan280 59155c8ee0 Merge branch 'main' into nushell_completion 2026-03-04 20:03:59 +06:00
Ajeet D'Souza fb1495b0ad
Handle prompts ending in space (#1189) 2026-03-01 15:32:40 +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
Juhan280 be220c9542 use display_override 2026-02-21 02:36:42 +06:00
Juhan280 b8844cd373 make closures in `any` command return boolean 2026-02-19 01:48:13 +06:00
Juhan280 b106d384e7 disble filtering 2026-02-13 17:48:16 +06:00
Juhan280 9ae8519506 always escape the paths 2026-02-12 20:09:10 +06:00
Juhan280 79f5f6671b update minimum nushell version 0.106.0 2026-02-12 19:51:53 +06:00
Juhan280 bdedc2a813 Wrap nushell integration script in a module
This prevents the completion command "nu-complete __zoxide_z" from
polluting the command namespace.
2026-02-12 17:13:39 +06:00
Juhan280 32ed3ec28a Add nushell completion for __zoxide_z 2026-02-12 17:04:38 +06:00
Andrew Bradley d7458b756e
Support symlinks on Windows (#1149) 2026-02-02 11:07:36 +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
Ajeet D'Souza d304543d2e
Remove uses of builtin from POSIX (#1146) 2025-11-18 20:14:28 +05:30
Mark Derricutt ecf72c9cfd
Update zoxide to support Fish 4.1.x (#1046) 2025-11-18 14:49:41 +05:30
Ajeet D'Souza 0c55cb9621
Avoid wrecking pipestatus in Bash (#1141) 2025-11-18 06:32:03 +05:30
Sandro 5fde31383f
Don't downcast PROMPT_COMMAND (#1036) 2025-11-02 04:43:18 +05:30
Tony 6324b4e347
Add support for multi digits dirstack entry (e.g. +12). (#1080) 2025-06-17 15:27:46 +05:30
Steven Xu db14bdc2ff
nushell: use sigil operator (#1070) 2025-05-31 04:53:54 +05:30
smolsbs ee8bbe57d3
Fixed the arg[0] argument position (#1056) 2025-05-16 03:19:09 -07:00
Koichi Murase 9c0dcf12f3
Run the cd command after "cd ... <space><tab>" in Bash integration (#1055) 2025-05-14 08:38:54 +05:30
benz 628f8542a0
Fixes #995: Wildcard expansion for PowerShell (#1001)
Co-authored-by: Ajeet D'Souza <98ajeet@gmail.com>
2025-05-13 17:48:55 +05:30
Ajeet D'Souza 8e14038811 Fix lints 2025-05-12 06:22:54 -07:00
Ajeet D'Souza 1d08fe2b84 Add doctor for POSIX shells 2025-05-11 23:24:35 -07:00
Ajeet D'Souza 36537410cd Doctor should handle PROMPT_COMMAND being an array 2025-05-10 23:41:55 -07:00
Ajeet D'Souza 306d7ae143 Fix shellcheck lint 2025-05-10 21:52:39 -07:00
Ajeet D'Souza 9768e645c7 Remove unneeded quotes 2025-05-10 11:27:02 -07:00
Ajeet D'Souza 8f0288b0c9 Check if zoxide is running under VS Code 2025-05-10 10:22:20 -07:00
Koichi Murase 6ec0436859
Add fixes to Bash integration (#1048) 2025-05-10 13:21:47 +05:30
Ajeet D'Souza 095b270fea csh -> tcsh 2025-05-06 00:26:07 -07:00
Ajeet D'Souza 09aa626a86
Add support for csh (#1047) 2025-05-06 11:28:54 +05:30
Lisa FS 7691d7e9a5
nushell: fix jumping to symlinks that are not in the database (#1032)
Expand path before checking for its type. This solves the issue of ignoring symlinks.
2025-04-13 08:46:27 -05:00
Brian 6902d375c5
powershell: Ignore errors from `__zoxide_hooked` (#1038) 2025-04-10 15:46:57 +05:30
Ajeet D'Souza 6679619c00 bash: rewrite prompt after space-tab 2025-03-19 06:01:14 +05:30
Ajeet D'Souza 06f9f3f27c Release v0.9.7 2025-02-10 03:10:20 +05:30
Bahex da0fdb2bae
Update nushell init script (#966) 2025-02-10 02:47:41 +05:30
Ajeet D'Souza 3fe42e901e bash doctor 2025-01-09 04:36:18 +05:30
Ajeet D'Souza 791deec8ac zsh doctor 2025-01-09 03:53:39 +05:30