diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 389d06b..40695f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,11 @@ jobs: with: crate: cargo-audit version: latest + - uses: actions-rs/install@v0.1 + if: ${{ matrix.os != 'windows-latest' }} + with: + crate: nu + version: latest - uses: cachix/install-nix-action@v12 if: ${{ matrix.os != 'windows-latest' }} with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8dcfeeb..32f3f85 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,14 +1,17 @@ on: push: tags: - - "v*" # push events to matching v*, i.e. v1.0, v20.15.10 + - "v*" jobs: build-linux: runs-on: ubuntu-latest strategy: matrix: - target: ["x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "armv7-unknown-linux-musleabihf"] + target: + - "x86_64-unknown-linux-gnu" + - "x86_64-unknown-linux-musl" + - "armv7-unknown-linux-musleabihf" steps: - uses: actions/checkout@v2 - uses: actions-rs/cargo@v1 @@ -46,7 +49,7 @@ jobs: with: name: "zoxide-x86_64-pc-windows-msvc" path: "target/x86_64-pc-windows-msvc/release/zoxide.exe" - + release-upload: needs: - build-linux diff --git a/CHANGELOG.md b/CHANGELOG.md index 6969fef..c6b60ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Handle broken pipe errors gracefully when writing to streams. - NUL file appearing in working directory on Windows. - Accidental redefinition of hooks when initialized twice on some shells. +- zoxide unable to find itself on Xonsh shells. ### Removed diff --git a/Makefile b/Makefile index eaa5007..310f632 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ endif ifeq ($(NIX), true) build: - nix-shell --pure --run 'cargo build $(build_flags) $(ci_color_always)' + nix-shell --run 'cargo build $(build_flags) $(ci_color_always)' else build: cargo build $(build_flags) $(ci_color_always) @@ -24,7 +24,7 @@ endif ifeq ($(NIX), true) clean: - nix-shell --pure --run 'cargo clean $(ci_color_always)' + nix-shell --run 'cargo clean $(ci_color_always)' else clean: cargo clean $(ci_color_always) @@ -32,7 +32,7 @@ endif ifeq ($(NIX), true) install: - nix-shell --pure --run 'cargo install --path=. $(ci_color_always)' + nix-shell --run 'cargo install --path=. $(ci_color_always)' else install: cargo install --path=. $(ci_color_always) @@ -40,11 +40,11 @@ endif ifeq ($(NIX), true) test: - nix-shell --pure --run 'cargo fmt -- --check --files-with-diff $(ci_color_always)' - nix-shell --pure --run 'cargo check --all-features $(ci_color_always)' - nix-shell --pure --run 'cargo clippy --all-features $(ci_color_always) -- --deny warnings --deny clippy::all' - nix-shell --pure --run 'cargo test --all-features --no-fail-fast $(ci_color_always)' - nix-shell --pure --run 'cargo audit --deny warnings $(ci_color_always) --ignore=RUSTSEC-2020-0095' + nix-shell --run 'cargo fmt -- --check --files-with-diff $(ci_color_always)' + nix-shell --run 'cargo check --all-features $(ci_color_always)' + nix-shell --run 'cargo clippy --all-features $(ci_color_always) -- --deny warnings --deny clippy::all' + nix-shell --run 'cargo test --all-features --no-fail-fast $(ci_color_always)' + nix-shell --run 'cargo audit --deny warnings $(ci_color_always) --ignore=RUSTSEC-2020-0095' else test: cargo fmt -- --check --files-with-diff $(ci_color_always) @@ -56,7 +56,7 @@ endif ifeq ($(NIX), true) uninstall: - nix-shell --pure --run 'cargo uninstall $(ci_color_always)' + nix-shell --run 'cargo uninstall $(ci_color_always)' else uninstall: cargo uninstall $(ci_color_always) diff --git a/shell.nix b/shell.nix index e6e11a2..8d53eb3 100644 --- a/shell.nix +++ b/shell.nix @@ -14,6 +14,7 @@ pkgs.mkShell { pkgs.fish pkgs.fzf pkgs.git + # pkgs.nushell # FIXME: too outdated pkgs.powershell pkgs.rustc pkgs.shellcheck diff --git a/templates/nushell.txt b/templates/nushell.txt index 7e356aa..87f29e9 100644 --- a/templates/nushell.txt +++ b/templates/nushell.txt @@ -33,11 +33,11 @@ def __zoxide_hook [] { # Jump to a directory using only keywords. def __zoxide_z [...rest:string] { - if $(echo $rest | count) == 1 { + if $(echo $rest | length) == 1 { cd ~ } { let args = $(echo $rest | skip 1); - if $(echo $args | count) == 1 { + if $(echo $args | length) == 1 { let arg0 = $(echo $args | first 1); if $arg0 == '-' { cd -