From f67c1f9d055cb465bac4bdd151926eabb0f59121 Mon Sep 17 00:00:00 2001 From: cornfeedhobo Date: Fri, 8 Jan 2021 09:32:28 -0600 Subject: [PATCH] allow logic operators as newline operators --- .editorconfig | 1 - completion/available/knife.completion.bash | 4 ++-- lint_clean_files.sh | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.editorconfig b/.editorconfig index 0f5876c4..f7e75174 100755 --- a/.editorconfig +++ b/.editorconfig @@ -20,7 +20,6 @@ indent_style = tab indent_size = 4 shell_variant = bash -binary_next_line = true # like -bn switch_case_indent = true # like -ci space_redirects = true # like -sr keep_padding = true # like -kp diff --git a/completion/available/knife.completion.bash b/completion/available/knife.completion.bash index cf050e36..8b699847 100644 --- a/completion/available/knife.completion.bash +++ b/completion/available/knife.completion.bash @@ -88,8 +88,8 @@ _KAC_clean_cache() { _KAC_is_file_newer_than "$FILE" "$_KNIFE_AUTOCOMPLETE_MAX_CACHE_AGE" || rm -f "$FILE" done # refresh really stale caches - find "$_KNIFE_AUTOCOMPLETE_CACHE_DIR" -maxdepth 1 -type f -not -name '.*' \ - | while read -r FILE; do + find "$_KNIFE_AUTOCOMPLETE_CACHE_DIR" -maxdepth 1 -type f -not -name '.*' | + while read -r FILE; do _KAC_is_file_newer_than "$FILE" "$_KNIFE_AUTOCOMPLETE_MAX_CACHE_AGE" && continue # first let's get the original command CMD=$(_KAC_get_command_from_cache_name "$(basename "$FILE")") diff --git a/lint_clean_files.sh b/lint_clean_files.sh index 26650b16..642b8415 100755 --- a/lint_clean_files.sh +++ b/lint_clean_files.sh @@ -7,10 +7,10 @@ # # shellcheck disable=SC2002 # Prefer 'cat' for cleaner script mapfile -t FILES < <( - cat clean_files.txt \ - | grep -v -E '^\s*$' \ - | grep -v -E '^\s*#' \ - | xargs -n1 -I{} find "{}" -type f + cat clean_files.txt | + grep -v -E '^\s*$' | + grep -v -E '^\s*#' | + xargs -n1 -I{} find "{}" -type f ) # We clear the BASH_IT variable to help the shellcheck checker