Remove conflicting alias definitions (#237)

This commit is contained in:
Ajeet D'Souza 2021-07-21 02:39:18 +05:30 committed by GitHub
parent 20d9f3d18c
commit e3c3c181a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 34 additions and 26 deletions

View File

@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, macos-latest, windows-latest]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/install@v0.1 - uses: actions-rs/install@v0.1

View File

@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Nushell: errors on 0.33.0. - Nushell: errors on 0.33.0.
- PowerShell: errors when initializing in `StrictMode`. - PowerShell: errors when initializing in `StrictMode`.
- Bash/POSIX: remove conflicting alias definitions when initializing.
## [0.7.2] - 2021-06-10 ## [0.7.2] - 2021-06-10

View File

@ -1,28 +1,36 @@
let let
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/20.09.tar.gz") {}; rust = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
pkgs-master = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/8e4c6b845965440850eaec79db7086e5d9e350fd.tar.gz") {}; pkgs = import <nixpkgs> { overlays = [ rust ]; };
pkgs-python = pkgs-master.python3.withPackages (pkgs: [ pkgs.black pkgs.mypy pkgs.pylint ]); pkgs-latest = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/94e725d3299cbeb71419758d671dfb0771b8e318.tar.gz") {};
pkgs-python = pkgs-latest.python3.withPackages (pkgs: [ pkgs.black pkgs.mypy pkgs.pylint ]);
in in
pkgs.mkShell { pkgs.mkShell {
buildInputs = [ buildInputs = [
pkgs-master.cargo-audit # Rust
pkgs-master.elvish pkgs.rust-bin.stable.latest.default
pkgs-master.nushell
pkgs-master.shellcheck # Shells
pkgs-master.shfmt pkgs-latest.bash
pkgs-latest.dash
pkgs-latest.elvish
pkgs-latest.nushell
pkgs-latest.fish
pkgs-latest.powershell
pkgs-latest.xonsh
pkgs-latest.zsh
# Linters
pkgs-latest.cargo-audit
pkgs-latest.shellcheck
pkgs-latest.shfmt
pkgs-python pkgs-python
pkgs.bash
pkgs.cargo # Dependencies
pkgs.clippy pkgs.cacert
pkgs.dash pkgs.libiconv
pkgs.fish pkgs-latest.fzf
pkgs.fzf pkgs-latest.git
pkgs.git
pkgs.powershell
pkgs.rustc
pkgs.rustfmt
pkgs.xonsh
pkgs.zsh
]; ];
RUST_BACKTRACE = 1; RUST_BACKTRACE = 1;
} }

View File

@ -399,7 +399,7 @@ mod tests {
let source = Zsh(&opts).render().unwrap(); let source = Zsh(&opts).render().unwrap();
Command::new("zsh") Command::new("zsh")
.args(&["-c", &source, "--no-rcs"]) .args(&["-c", &source, "--no-globalrcs", "--no-rcs"])
.assert() .assert()
.success() .success()
.stdout("") .stdout("")

View File

@ -109,10 +109,9 @@ function __zoxide_zi() {
# Remove definitions. # Remove definitions.
function __zoxide_unset() { function __zoxide_unset() {
# shellcheck disable=SC1001
\builtin unset -f "$@" &>/dev/null \builtin unset -f "$@" &>/dev/null
# shellcheck disable=SC1001
\builtin unset -v "$@" &>/dev/null \builtin unset -v "$@" &>/dev/null
\builtin unalias "$@" &>/dev/null || \builtin :
} }
__zoxide_unset '{{cmd}}' __zoxide_unset '{{cmd}}'

View File

@ -92,10 +92,10 @@ __zoxide_zi() {
# Remove definitions. # Remove definitions.
__zoxide_unset() { __zoxide_unset() {
# shellcheck disable=SC1001
\unset -f "$@" >/dev/null 2>&1 \unset -f "$@" >/dev/null 2>&1
# shellcheck disable=SC1001
\unset -v "$@" >/dev/null 2>&1 \unset -v "$@" >/dev/null 2>&1
# shellcheck disable=SC1001
\unalias "$@" >/dev/null 2>&1 || \:
} }
__zoxide_unset '{{cmd}}' __zoxide_unset '{{cmd}}'