mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-11-22 04:45:20 +00:00
Remove conflicting alias definitions (#237)
This commit is contained in:
parent
20d9f3d18c
commit
e3c3c181a2
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
48
shell.nix
48
shell.nix
@ -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;
|
||||
}
|
||||
|
@ -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("")
|
||||
|
@ -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}}'
|
||||
|
@ -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}}'
|
||||
|
Loading…
Reference in New Issue
Block a user