Compare commits
3 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
cf086b057d | |
|
|
670bdf21b9 | |
|
|
1f484a4e34 |
|
|
@ -1,4 +1,4 @@
|
|||
name: Continuous Deployment
|
||||
name: cd
|
||||
on:
|
||||
push:
|
||||
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/),
|
||||
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
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ function __zoxide_pwd() {
|
|||
{%- let pwd = "\\builtin pwd -L" -%}
|
||||
{%- endif -%}
|
||||
{%- if cfg!(windows) %}
|
||||
\command cygpath -w "{{ pwd }}"
|
||||
\command cygpath -w "$({{ pwd }})"
|
||||
{%- else %}
|
||||
{{ pwd }}
|
||||
{%- endif %}
|
||||
|
|
|
|||
|
|
@ -101,8 +101,12 @@ function __zoxide_z_complete
|
|||
# If the last argument is empty, use interactive selection.
|
||||
set -l query $tokens[2..-1]
|
||||
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)
|
||||
and builtin commandline --function repaint execute
|
||||
if test $status -eq 0
|
||||
builtin commandline --replace -- "{{ cmd.unwrap_or("cd") }} "(string escape -- $result)
|
||||
builtin commandline --function repaint execute
|
||||
else
|
||||
builtin commandline --function repaint
|
||||
end
|
||||
end
|
||||
end
|
||||
complete --command __zoxide_z --no-files --arguments '(__zoxide_z_complete)'
|
||||
|
|
|
|||
|
|
@ -57,15 +57,14 @@ export-env {
|
|||
|
||||
# Jump to a directory using only keywords.
|
||||
export def --env --wrapped __zoxide_z [...rest: directory] {
|
||||
let path = match $rest {
|
||||
[] => {'~'},
|
||||
[ '-' ] => {'-'},
|
||||
[ $arg ] if ($arg | path expand | path type) == 'dir' => {$arg}
|
||||
match $rest {
|
||||
[] => { cd ~ },
|
||||
[ '-' ] => { cd - },
|
||||
[ $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 %}
|
||||
echo $env.PWD
|
||||
{%- endif %}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ function __zoxide_pwd() {
|
|||
{%- let pwd = "\\builtin pwd -L" -%}
|
||||
{%- endif -%}
|
||||
{%- if cfg!(windows) %}
|
||||
\command cygpath -w "{{ pwd }}"
|
||||
\command cygpath -w "$({{ pwd }})"
|
||||
{%- else %}
|
||||
{{ pwd }}
|
||||
{%- endif %}
|
||||
|
|
|
|||
Loading…
Reference in New Issue