allow logic operators as newline operators

pull/1769/head
cornfeedhobo 2021-01-08 09:32:28 -06:00
parent 3fce1ffe8d
commit f67c1f9d05
No known key found for this signature in database
GPG Key ID: 724357093F994B26
3 changed files with 6 additions and 7 deletions

View File

@ -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

View File

@ -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")")

View File

@ -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