Compare commits
3 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
cf086b057d | |
|
|
670bdf21b9 | |
|
|
1f484a4e34 |
|
|
@ -1,4 +1,4 @@
|
||||||
name: Continuous Deployment
|
name: cd
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,13 @@ 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).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Bash/Zsh: fix `z` failing on Cygwin/MSYS2 due to `cygpath` being passed a bad string.
|
||||||
|
- Nushell: `z` now handles relative paths through symlinked directories.
|
||||||
|
|
||||||
## [0.10.0] - 2026-07-04
|
## [0.10.0] - 2026-07-04
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ function __zoxide_pwd() {
|
||||||
{%- let pwd = "\\builtin pwd -L" -%}
|
{%- let pwd = "\\builtin pwd -L" -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- if cfg!(windows) %}
|
{%- if cfg!(windows) %}
|
||||||
\command cygpath -w "{{ pwd }}"
|
\command cygpath -w "$({{ pwd }})"
|
||||||
{%- else %}
|
{%- else %}
|
||||||
{{ pwd }}
|
{{ pwd }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,12 @@ function __zoxide_z_complete
|
||||||
# If the last argument is empty, use interactive selection.
|
# If the last argument is empty, use interactive selection.
|
||||||
set -l query $tokens[2..-1]
|
set -l query $tokens[2..-1]
|
||||||
set -l result (command zoxide query --exclude (__zoxide_pwd) --interactive -- $query 2>/dev/null)
|
set -l result (command zoxide query --exclude (__zoxide_pwd) --interactive -- $query 2>/dev/null)
|
||||||
and builtin commandline --replace -- "{{ cmd.unwrap_or("cd") }} "(string escape -- $result)
|
if test $status -eq 0
|
||||||
and builtin commandline --function repaint execute
|
builtin commandline --replace -- "{{ cmd.unwrap_or("cd") }} "(string escape -- $result)
|
||||||
|
builtin commandline --function repaint execute
|
||||||
|
else
|
||||||
|
builtin commandline --function repaint
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
complete --command __zoxide_z --no-files --arguments '(__zoxide_z_complete)'
|
complete --command __zoxide_z --no-files --arguments '(__zoxide_z_complete)'
|
||||||
|
|
|
||||||
|
|
@ -57,15 +57,14 @@ export-env {
|
||||||
|
|
||||||
# Jump to a directory using only keywords.
|
# Jump to a directory using only keywords.
|
||||||
export def --env --wrapped __zoxide_z [...rest: directory] {
|
export def --env --wrapped __zoxide_z [...rest: directory] {
|
||||||
let path = match $rest {
|
match $rest {
|
||||||
[] => {'~'},
|
[] => { cd ~ },
|
||||||
[ '-' ] => {'-'},
|
[ '-' ] => { cd - },
|
||||||
[ $arg ] if ($arg | path expand | path type) == 'dir' => {$arg}
|
[ $arg ] if (try { cd $arg; true } catch { false }) => {},
|
||||||
_ => {
|
_ => {
|
||||||
^zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n"
|
cd (^zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cd $path
|
|
||||||
{%- if echo %}
|
{%- if echo %}
|
||||||
echo $env.PWD
|
echo $env.PWD
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ function __zoxide_pwd() {
|
||||||
{%- let pwd = "\\builtin pwd -L" -%}
|
{%- let pwd = "\\builtin pwd -L" -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- if cfg!(windows) %}
|
{%- if cfg!(windows) %}
|
||||||
\command cygpath -w "{{ pwd }}"
|
\command cygpath -w "$({{ pwd }})"
|
||||||
{%- else %}
|
{%- else %}
|
||||||
{{ pwd }}
|
{{ pwd }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue