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 }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- 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.
- PowerShell: errors when initializing in `StrictMode`.
- Bash/POSIX: remove conflicting alias definitions when initializing.
## [0.7.2] - 2021-06-10

View File

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

View File

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

View File

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

View File

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