From 4b1feb16fc6aab1add15f6464956d1d2952f7624 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Wed, 12 Apr 2023 10:07:51 +0300 Subject: [PATCH] zsh: PATH and shellcheck stuff --- base/zshrc | 1 + config/exports | 2 ++ config/exports-apps | 5 +++-- config/exports-shell | 6 ++++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/base/zshrc b/base/zshrc index f5599e2..eed0109 100644 --- a/base/zshrc +++ b/base/zshrc @@ -38,3 +38,4 @@ if command -v antigen &> /dev/null; then fi eval "$(starship init zsh)" + diff --git a/config/exports b/config/exports index a08b270..220c7f4 100755 --- a/config/exports +++ b/config/exports @@ -3,6 +3,7 @@ # vim: filetype=zsh export DOTFILES="$HOME/.dotfiles" +export PATH="$DOTFILES/local/bin:$PATH" # Explicitly set XDG folders # https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html @@ -40,3 +41,4 @@ source "$DOTFILES/config/exports-apps" if command -v nvim &> /dev/null; then export EDITOR="nvim" fi + diff --git a/config/exports-apps b/config/exports-apps index ae7346f..369e724 100755 --- a/config/exports-apps +++ b/config/exports-apps @@ -1,5 +1,6 @@ #!/usr/bin/env bash -# shellcheck shell=zsh +# shellcheck shell=bash +# shellcheck enable=external-sources # vim: filetype=zsh # Antigen configuration @@ -70,7 +71,7 @@ fi export NVM_LAZY_LOAD=true export NVM_COMPLETION=true export NVM_AUTO_USE=true -export NVM_DIR="${XDG_CONFIG_HOME}/nvm" +export NVM_DIR="$XDG_CONFIG_HOME/nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion diff --git a/config/exports-shell b/config/exports-shell index 6ee5e8b..d749b4f 100755 --- a/config/exports-shell +++ b/config/exports-shell @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# shellcheck shell=zsh +# shellcheck shell=bash # vim: filetype=zsh export LC_ALL=fi_FI.utf8 @@ -40,6 +40,7 @@ hash shopt 2> /dev/null && shopt -s checkwinsize # Set dircolors based on the file, if it exists if command -v dircolors &> /dev/null; then + # shellcheck disable=SC2046 eval $(dircolors "$XDG_CONFIG_HOME/dircolors") fi @@ -49,5 +50,6 @@ if [ "$SHELL" = "$(which zsh)" ]; then x-dc "$XDG_STATE_HOME/zsh" export HISTFILE="$XDG_STATE_HOME/zsh/history" zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/zcompcache" - zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" + zstyle ':completion:*' list-colors "$LS_COLORS" fi +