From fd575d37845a471644b9ecbdf8a7877bb72e913b Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Sun, 22 May 2022 14:51:25 +0200 Subject: [PATCH] zsh:funcs:spellcheck: Fix indentation I forgot to reindent part of the function after moving the if (( $+commands[shellcheck] )) check into the function. Before it was wrapping the function definition. --- .config/zsh/zshrc.d/40-functions.zsh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.config/zsh/zshrc.d/40-functions.zsh b/.config/zsh/zshrc.d/40-functions.zsh index 222bdd5..20e543f 100644 --- a/.config/zsh/zshrc.d/40-functions.zsh +++ b/.config/zsh/zshrc.d/40-functions.zsh @@ -519,15 +519,15 @@ shellcheck() { "Using www.shellcheck.net. You might want to install shellcheck.\n\n" local url json_parser arg - url='https://www.shellcheck.net/shellcheck.php' - json_parser="${${commands[jq]:-cat}:c}" + url='https://www.shellcheck.net/shellcheck.php' + json_parser="${${commands[jq]:-cat}:c}" - for arg; do - if [[ ! -r $arg ]]; then - printf "%s\n" "$arg: File does not exist or is non-readable" >&2 - continue - fi - curl -sS "$url" -X POST --data-urlencode script@"$arg" \ - | "$json_parser" - done - } + for arg; do + if [[ ! -r $arg ]]; then + printf "%s\n" "$arg: File does not exist or is non-readable" >&2 + continue + fi + curl -sS "$url" -X POST --data-urlencode script@"$arg" \ + | "$json_parser" + done +}