From e49d51cd601964d258dff8c84d0e46a148c7332e Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Tue, 13 Nov 2018 23:59:41 +0200 Subject: [PATCH] use better code style in path.zsh --- lib/path.zsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/path.zsh b/lib/path.zsh index a9319c0..d587435 100644 --- a/lib/path.zsh +++ b/lib/path.zsh @@ -40,8 +40,7 @@ path=(~/bin ~/.local/bin "${path[@]}") fpath=("$DOTFILES_PATH/completions" "${fpath[@]}") # check for Rust installed via rustup -rust_sysroot="$(~/.cargo/bin/rustc --print sysroot)" -if [[ "$?" == 0 ]]; then +if rust_sysroot="$(~/.cargo/bin/rustc --print sysroot)"; then # add paths to the current Rust toolchain path=(~/.cargo/bin "${path[@]}") fpath=("$rust_sysroot/share/zsh/site-functions" "${fpath[@]}")