From 861136c47596a0cf6de8ff5bb91fefd29d69642e Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 31 Aug 2023 10:41:17 +0000 Subject: [PATCH] treewide: add 'shellcheck shell' directives I used 'bash' for zsh files, since that's the closest and `shell=zsh` is not supported [1]. [1]: https://github.com/koalaman/shellcheck/issues/809 --- bootstrap.sh | 1 + home/zsh/completion-styles.zsh | 2 ++ home/zsh/extra-mappings.zsh | 1 + home/zsh/options.zsh | 2 ++ 4 files changed, 6 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index b1c418e..955617d 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,5 +1,6 @@ #!/usr/bin/env nix-shell #! nix-shell -i bash -p bitwarden-cli git gnupg jq nix +# shellcheck shell=bash # Command failure is script failure set -e diff --git a/home/zsh/completion-styles.zsh b/home/zsh/completion-styles.zsh index 156bc2c..87bb014 100644 --- a/home/zsh/completion-styles.zsh +++ b/home/zsh/completion-styles.zsh @@ -1,3 +1,5 @@ +# shellcheck shell=bash + # Style the completion a bit zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} # Show a prompt on selection diff --git a/home/zsh/extra-mappings.zsh b/home/zsh/extra-mappings.zsh index 3456e13..fea2f96 100644 --- a/home/zsh/extra-mappings.zsh +++ b/home/zsh/extra-mappings.zsh @@ -1,3 +1,4 @@ +# shellcheck shell=bash # shellcheck disable=2154 # Fix Ctrl+u killing from the cursor instead of the whole line diff --git a/home/zsh/options.zsh b/home/zsh/options.zsh index 82047ff..32da8d8 100644 --- a/home/zsh/options.zsh +++ b/home/zsh/options.zsh @@ -1,3 +1,5 @@ +# shellcheck shell=bash + # Show an error when a globbing expansion doesn't find any match setopt nomatch # List on ambiguous completion and Insert first match immediately