Error: SHELLCHECK_WARNING (CWE-758): [#def1] /etc/profile.d/less.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. # 1|-> # less initialization script (sh) # 2| # 3| # All less.*sh files should have the same semantics! Error: SHELLCHECK_WARNING: [#def2] /usr/bin/archive_color:16:2: warning[SC3043]: In POSIX sh, 'local' is undefined. # 14| # 15| get_file_code() { # 16|-> local line=$1 # 17| local len=${#line} # 18| (( len < 20 )) && return 1 Error: SHELLCHECK_WARNING: [#def3] /usr/bin/archive_color:17:2: warning[SC3043]: In POSIX sh, 'local' is undefined. # 15| get_file_code() { # 16| local line=$1 # 17|-> local len=${#line} # 18| (( len < 20 )) && return 1 # 19| local c0=${line:0:1} Error: SHELLCHECK_WARNING: [#def4] /usr/bin/archive_color:18:2: warning[SC3006]: In POSIX sh, standalone ((..)) is undefined. # 16| local line=$1 # 17| local len=${#line} # 18|-> (( len < 20 )) && return 1 # 19| local c0=${line:0:1} # 20| local perm10=${line:0:10} Error: SHELLCHECK_WARNING: [#def5] /usr/bin/archive_color:19:2: warning[SC3043]: In POSIX sh, 'local' is undefined. # 17| local len=${#line} # 18| (( len < 20 )) && return 1 # 19|-> local c0=${line:0:1} # 20| local perm10=${line:0:10} # 21| local c3=${line:3:1} Error: SHELLCHECK_WARNING: [#def6] /usr/bin/archive_color:19:11: warning[SC3057]: In POSIX sh, string indexing is undefined. # 17| local len=${#line} # 18| (( len < 20 )) && return 1 # 19|-> local c0=${line:0:1} # 20| local perm10=${line:0:10} # 21| local c3=${line:3:1} Error: SHELLCHECK_WARNING: [#def7] /usr/bin/archive_color:20:2: warning[SC3043]: In POSIX sh, 'local' is undefined. # 18| (( len < 20 )) && return 1 # 19| local c0=${line:0:1} # 20|-> local perm10=${line:0:10} # 21| local c3=${line:3:1} # 22| local c6=${line:6:1} Error: SHELLCHECK_WARNING: [#def8] /usr/bin/archive_color:20:15: warning[SC3057]: In POSIX sh, string indexing is undefined. # 18| (( len < 20 )) && return 1 # 19| local c0=${line:0:1} # 20|-> local perm10=${line:0:10} # 21| local c3=${line:3:1} # 22| local c6=${line:6:1} Error: SHELLCHECK_WARNING: [#def9] /usr/bin/archive_color:21:2: warning[SC3043]: In POSIX sh, 'local' is undefined. # 19| local c0=${line:0:1} # 20| local perm10=${line:0:10} # 21|-> local c3=${line:3:1} # 22| local c6=${line:6:1} # 23| local last3=${line: -3} Error: SHELLCHECK_WARNING: [#def10] /usr/bin/archive_color:21:11: warning[SC3057]: In POSIX sh, string indexing is undefined. # 19| local c0=${line:0:1} # 20| local perm10=${line:0:10} # 21|-> local c3=${line:3:1} # 22| local c6=${line:6:1} # 23| local last3=${line: -3} Error: SHELLCHECK_WARNING: [#def11] /usr/bin/archive_color:22:2: warning[SC3043]: In POSIX sh, 'local' is undefined. # 20| local perm10=${line:0:10} # 21| local c3=${line:3:1} # 22|-> local c6=${line:6:1} # 23| local last3=${line: -3} # 24| local l2=${last3:0:2} Error: SHELLCHECK_WARNING: [#def12] /usr/bin/archive_color:22:11: warning[SC3057]: In POSIX sh, string indexing is undefined. # 20| local perm10=${line:0:10} # 21| local c3=${line:3:1} # 22|-> local c6=${line:6:1} # 23| local last3=${line: -3} # 24| local l2=${last3:0:2} Error: SHELLCHECK_WARNING: [#def13] /usr/bin/archive_color:23:2: warning[SC3043]: In POSIX sh, 'local' is undefined. # 21| local c3=${line:3:1} # 22| local c6=${line:6:1} # 23|-> local last3=${line: -3} # 24| local l2=${last3:0:2} # 25| Error: SHELLCHECK_WARNING: [#def14] /usr/bin/archive_color:23:14: warning[SC3057]: In POSIX sh, string indexing is undefined. # 21| local c3=${line:3:1} # 22| local c6=${line:6:1} # 23|-> local last3=${line: -3} # 24| local l2=${last3:0:2} # 25| Error: SHELLCHECK_WARNING: [#def15] /usr/bin/archive_color:24:2: warning[SC3043]: In POSIX sh, 'local' is undefined. # 22| local c6=${line:6:1} # 23| local last3=${line: -3} # 24|-> local l2=${last3:0:2} # 25| # 26| [[ $c0 == "l" ]] && echo "ln" && return Error: SHELLCHECK_WARNING: [#def16] /usr/bin/archive_color:24:11: warning[SC3057]: In POSIX sh, string indexing is undefined. # 22| local c6=${line:6:1} # 23| local last3=${line: -3} # 24|-> local l2=${last3:0:2} # 25| # 26| [[ $c0 == "l" ]] && echo "ln" && return Error: SHELLCHECK_WARNING: [#def17] /usr/bin/archive_color:26:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 24| local l2=${last3:0:2} # 25| # 26|-> [[ $c0 == "l" ]] && echo "ln" && return # 27| [[ $perm10 == "drwxrwxrwx" ]] && echo "ow" # 28| [[ $perm10 == "drwxrwxrwt" ]] && echo "tw" Error: SHELLCHECK_WARNING: [#def18] /usr/bin/archive_color:26:9: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 24| local l2=${last3:0:2} # 25| # 26|-> [[ $c0 == "l" ]] && echo "ln" && return # 27| [[ $perm10 == "drwxrwxrwx" ]] && echo "ow" # 28| [[ $perm10 == "drwxrwxrwt" ]] && echo "tw" Error: SHELLCHECK_WARNING: [#def19] /usr/bin/archive_color:27:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 25| # 26| [[ $c0 == "l" ]] && echo "ln" && return # 27|-> [[ $perm10 == "drwxrwxrwx" ]] && echo "ow" # 28| [[ $perm10 == "drwxrwxrwt" ]] && echo "tw" # 29| [[ $c0 == "d" ]] && echo "di" && return Error: SHELLCHECK_WARNING: [#def20] /usr/bin/archive_color:27:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 25| # 26| [[ $c0 == "l" ]] && echo "ln" && return # 27|-> [[ $perm10 == "drwxrwxrwx" ]] && echo "ow" # 28| [[ $perm10 == "drwxrwxrwt" ]] && echo "tw" # 29| [[ $c0 == "d" ]] && echo "di" && return Error: SHELLCHECK_WARNING: [#def21] /usr/bin/archive_color:28:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 26| [[ $c0 == "l" ]] && echo "ln" && return # 27| [[ $perm10 == "drwxrwxrwx" ]] && echo "ow" # 28|-> [[ $perm10 == "drwxrwxrwt" ]] && echo "tw" # 29| [[ $c0 == "d" ]] && echo "di" && return # 30| [[ $c0 == "s" ]] && echo "so" && return Error: SHELLCHECK_WARNING: [#def22] /usr/bin/archive_color:28:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 26| [[ $c0 == "l" ]] && echo "ln" && return # 27| [[ $perm10 == "drwxrwxrwx" ]] && echo "ow" # 28|-> [[ $perm10 == "drwxrwxrwt" ]] && echo "tw" # 29| [[ $c0 == "d" ]] && echo "di" && return # 30| [[ $c0 == "s" ]] && echo "so" && return Error: SHELLCHECK_WARNING: [#def23] /usr/bin/archive_color:29:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 27| [[ $perm10 == "drwxrwxrwx" ]] && echo "ow" # 28| [[ $perm10 == "drwxrwxrwt" ]] && echo "tw" # 29|-> [[ $c0 == "d" ]] && echo "di" && return # 30| [[ $c0 == "s" ]] && echo "so" && return # 31| [[ $c3 == "S" ]] && echo "su" && return Error: SHELLCHECK_WARNING: [#def24] /usr/bin/archive_color:29:9: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 27| [[ $perm10 == "drwxrwxrwx" ]] && echo "ow" # 28| [[ $perm10 == "drwxrwxrwt" ]] && echo "tw" # 29|-> [[ $c0 == "d" ]] && echo "di" && return # 30| [[ $c0 == "s" ]] && echo "so" && return # 31| [[ $c3 == "S" ]] && echo "su" && return Error: SHELLCHECK_WARNING: [#def25] /usr/bin/archive_color:30:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 28| [[ $perm10 == "drwxrwxrwt" ]] && echo "tw" # 29| [[ $c0 == "d" ]] && echo "di" && return # 30|-> [[ $c0 == "s" ]] && echo "so" && return # 31| [[ $c3 == "S" ]] && echo "su" && return # 32| [[ $c6 == "S" ]] && echo "sg" && return Error: SHELLCHECK_WARNING: [#def26] /usr/bin/archive_color:30:9: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 28| [[ $perm10 == "drwxrwxrwt" ]] && echo "tw" # 29| [[ $c0 == "d" ]] && echo "di" && return # 30|-> [[ $c0 == "s" ]] && echo "so" && return # 31| [[ $c3 == "S" ]] && echo "su" && return # 32| [[ $c6 == "S" ]] && echo "sg" && return Error: SHELLCHECK_WARNING: [#def27] /usr/bin/archive_color:31:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 29| [[ $c0 == "d" ]] && echo "di" && return # 30| [[ $c0 == "s" ]] && echo "so" && return # 31|-> [[ $c3 == "S" ]] && echo "su" && return # 32| [[ $c6 == "S" ]] && echo "sg" && return # 33| [[ $c0 == "p" ]] && echo "pi" && return Error: SHELLCHECK_WARNING: [#def28] /usr/bin/archive_color:31:9: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 29| [[ $c0 == "d" ]] && echo "di" && return # 30| [[ $c0 == "s" ]] && echo "so" && return # 31|-> [[ $c3 == "S" ]] && echo "su" && return # 32| [[ $c6 == "S" ]] && echo "sg" && return # 33| [[ $c0 == "p" ]] && echo "pi" && return Error: SHELLCHECK_WARNING: [#def29] /usr/bin/archive_color:32:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 30| [[ $c0 == "s" ]] && echo "so" && return # 31| [[ $c3 == "S" ]] && echo "su" && return # 32|-> [[ $c6 == "S" ]] && echo "sg" && return # 33| [[ $c0 == "p" ]] && echo "pi" && return # 34| [[ $c0 == "c" ]] && echo "cd" && return Error: SHELLCHECK_WARNING: [#def30] /usr/bin/archive_color:32:9: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 30| [[ $c0 == "s" ]] && echo "so" && return # 31| [[ $c3 == "S" ]] && echo "su" && return # 32|-> [[ $c6 == "S" ]] && echo "sg" && return # 33| [[ $c0 == "p" ]] && echo "pi" && return # 34| [[ $c0 == "c" ]] && echo "cd" && return Error: SHELLCHECK_WARNING: [#def31] /usr/bin/archive_color:33:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 31| [[ $c3 == "S" ]] && echo "su" && return # 32| [[ $c6 == "S" ]] && echo "sg" && return # 33|-> [[ $c0 == "p" ]] && echo "pi" && return # 34| [[ $c0 == "c" ]] && echo "cd" && return # 35| [[ $c0 == "b" ]] && echo "bd" && return Error: SHELLCHECK_WARNING: [#def32] /usr/bin/archive_color:33:9: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 31| [[ $c3 == "S" ]] && echo "su" && return # 32| [[ $c6 == "S" ]] && echo "sg" && return # 33|-> [[ $c0 == "p" ]] && echo "pi" && return # 34| [[ $c0 == "c" ]] && echo "cd" && return # 35| [[ $c0 == "b" ]] && echo "bd" && return Error: SHELLCHECK_WARNING: [#def33] /usr/bin/archive_color:34:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 32| [[ $c6 == "S" ]] && echo "sg" && return # 33| [[ $c0 == "p" ]] && echo "pi" && return # 34|-> [[ $c0 == "c" ]] && echo "cd" && return # 35| [[ $c0 == "b" ]] && echo "bd" && return # 36| [[ $c0 == "D" ]] && echo "do" && return Error: SHELLCHECK_WARNING: [#def34] /usr/bin/archive_color:34:9: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 32| [[ $c6 == "S" ]] && echo "sg" && return # 33| [[ $c0 == "p" ]] && echo "pi" && return # 34|-> [[ $c0 == "c" ]] && echo "cd" && return # 35| [[ $c0 == "b" ]] && echo "bd" && return # 36| [[ $c0 == "D" ]] && echo "do" && return Error: SHELLCHECK_WARNING: [#def35] /usr/bin/archive_color:35:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 33| [[ $c0 == "p" ]] && echo "pi" && return # 34| [[ $c0 == "c" ]] && echo "cd" && return # 35|-> [[ $c0 == "b" ]] && echo "bd" && return # 36| [[ $c0 == "D" ]] && echo "do" && return # 37| [[ $c3 == "x" ]] && echo "ex" && return Error: SHELLCHECK_WARNING: [#def36] /usr/bin/archive_color:35:9: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 33| [[ $c0 == "p" ]] && echo "pi" && return # 34| [[ $c0 == "c" ]] && echo "cd" && return # 35|-> [[ $c0 == "b" ]] && echo "bd" && return # 36| [[ $c0 == "D" ]] && echo "do" && return # 37| [[ $c3 == "x" ]] && echo "ex" && return Error: SHELLCHECK_WARNING: [#def37] /usr/bin/archive_color:36:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 34| [[ $c0 == "c" ]] && echo "cd" && return # 35| [[ $c0 == "b" ]] && echo "bd" && return # 36|-> [[ $c0 == "D" ]] && echo "do" && return # 37| [[ $c3 == "x" ]] && echo "ex" && return # 38| [[ $l2 == ./* ]] && echo "di" && return Error: SHELLCHECK_WARNING: [#def38] /usr/bin/archive_color:36:9: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 34| [[ $c0 == "c" ]] && echo "cd" && return # 35| [[ $c0 == "b" ]] && echo "bd" && return # 36|-> [[ $c0 == "D" ]] && echo "do" && return # 37| [[ $c3 == "x" ]] && echo "ex" && return # 38| [[ $l2 == ./* ]] && echo "di" && return Error: SHELLCHECK_WARNING: [#def39] /usr/bin/archive_color:37:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 35| [[ $c0 == "b" ]] && echo "bd" && return # 36| [[ $c0 == "D" ]] && echo "do" && return # 37|-> [[ $c3 == "x" ]] && echo "ex" && return # 38| [[ $l2 == ./* ]] && echo "di" && return # 39| [[ $line != *.* ]] && return 1 Error: SHELLCHECK_WARNING: [#def40] /usr/bin/archive_color:37:9: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 35| [[ $c0 == "b" ]] && echo "bd" && return # 36| [[ $c0 == "D" ]] && echo "do" && return # 37|-> [[ $c3 == "x" ]] && echo "ex" && return # 38| [[ $l2 == ./* ]] && echo "di" && return # 39| [[ $line != *.* ]] && return 1 Error: SHELLCHECK_WARNING: [#def41] /usr/bin/archive_color:38:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 36| [[ $c0 == "D" ]] && echo "do" && return # 37| [[ $c3 == "x" ]] && echo "ex" && return # 38|-> [[ $l2 == ./* ]] && echo "di" && return # 39| [[ $line != *.* ]] && return 1 # 40| echo "*.${line##*.}" Error: SHELLCHECK_WARNING: [#def42] /usr/bin/archive_color:38:9: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 36| [[ $c0 == "D" ]] && echo "do" && return # 37| [[ $c3 == "x" ]] && echo "ex" && return # 38|-> [[ $l2 == ./* ]] && echo "di" && return # 39| [[ $line != *.* ]] && return 1 # 40| echo "*.${line##*.}" Error: SHELLCHECK_WARNING: [#def43] /usr/bin/archive_color:39:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 37| [[ $c3 == "x" ]] && echo "ex" && return # 38| [[ $l2 == ./* ]] && echo "di" && return # 39|-> [[ $line != *.* ]] && return 1 # 40| echo "*.${line##*.}" # 41| } Error: SHELLCHECK_WARNING: [#def44] /usr/bin/archive_color:43:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 41| } # 42| # 43|-> if [[ -t 0 ]]; then # 44| echo "Example: tar tvzf some_tarball.tar.gz | archive_color" # 45| exit 0 Error: SHELLCHECK_WARNING: [#def45] /usr/bin/archive_color:48:1: warning[SC3044]: In POSIX sh, 'declare' is undefined. # 46| fi # 47| # 48|-> declare -A FILE_TYPE_TO_COLOR # 49| default_colors='di=01;34:ln=01;36:ex=01;32:so=01;35:pi=40;33:bd=40;33;01:cd=40;33;01:su=37;41:sg=30;43:do=01;35:tw=30;42:ow=34;42' # 50| tar_colors=${TAR_COLORS:-${LS_COLORS:-}} Error: SHELLCHECK_WARNING: [#def46] /usr/bin/archive_color:52:13: warning[SC3030]: In POSIX sh, arrays are undefined. # 50| tar_colors=${TAR_COLORS:-${LS_COLORS:-}} # 51| # shellcheck disable=SC2207 # 52|-> color_specs=($(echo "$default_colors:$tar_colors"| tr ":" "\n")) # 53| # 54| for spec in "${color_specs[@]}"; do Error: SHELLCHECK_WARNING: [#def47] /usr/bin/archive_color:54:14: warning[SC3054]: In POSIX sh, array references are undefined. # 52| color_specs=($(echo "$default_colors:$tar_colors"| tr ":" "\n")) # 53| # 54|-> for spec in "${color_specs[@]}"; do # 55| [[ -z $spec ]] && continue # 56| type=${spec%=*} Error: SHELLCHECK_WARNING: [#def48] /usr/bin/archive_color:55:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 53| # 54| for spec in "${color_specs[@]}"; do # 55|-> [[ -z $spec ]] && continue # 56| type=${spec%=*} # 57| codes=${spec#*=} Error: SHELLCHECK_WARNING: [#def49] /usr/bin/archive_color:58:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 56| type=${spec%=*} # 57| codes=${spec#*=} # 58|-> [[ -z $type || -z $codes ]] && continue # 59| FILE_TYPE_TO_COLOR[$type]="\033[${codes}m" # 60| done Error: SHELLCHECK_WARNING: [#def50] /usr/bin/archive_color:64:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 62| while IFS= read -r line; do # 63| type=$(get_file_code "$line") || true # 64|-> if [[ -n $type && -n ${FILE_TYPE_TO_COLOR[$type]+set} ]]; then # 65| [[ $(echo "$line"|awk '{print $4}') == *-*-* ]] && fld=6 || fld=9 # 66| filename=$(echo "$line"|awk '{print $'"$fld"'}') Error: SHELLCHECK_WARNING: [#def51] /usr/bin/archive_color:65:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 63| type=$(get_file_code "$line") || true # 64| if [[ -n $type && -n ${FILE_TYPE_TO_COLOR[$type]+set} ]]; then # 65|-> [[ $(echo "$line"|awk '{print $4}') == *-*-* ]] && fld=6 || fld=9 # 66| filename=$(echo "$line"|awk '{print $'"$fld"'}') # 67| filename="$filename${line##*"$filename"}" Error: SHELLCHECK_WARNING: [#def52] /usr/bin/archive_color:65:39: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 63| type=$(get_file_code "$line") || true # 64| if [[ -n $type && -n ${FILE_TYPE_TO_COLOR[$type]+set} ]]; then # 65|-> [[ $(echo "$line"|awk '{print $4}') == *-*-* ]] && fld=6 || fld=9 # 66| filename=$(echo "$line"|awk '{print $'"$fld"'}') # 67| filename="$filename${line##*"$filename"}" Error: SHELLCHECK_WARNING: [#def53] /usr/bin/archive_color:68:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 66| filename=$(echo "$line"|awk '{print $'"$fld"'}') # 67| filename="$filename${line##*"$filename"}" # 68|-> if [[ -n $filename ]]; then # 69| printf '%s%b%s%b\n' "${line%"$filename"}" "${FILE_TYPE_TO_COLOR[$type]}" "$filename" "\033[0m" # 70| else Error: SHELLCHECK_WARNING: [#def54] /usr/bin/archive_color:69:47: warning[SC3054]: In POSIX sh, array references are undefined. # 67| filename="$filename${line##*"$filename"}" # 68| if [[ -n $filename ]]; then # 69|-> printf '%s%b%s%b\n' "${line%"$filename"}" "${FILE_TYPE_TO_COLOR[$type]}" "$filename" "\033[0m" # 70| else # 71| printf '%s\n' "$line" Error: SHELLCHECK_WARNING: [#def55] /usr/bin/lesspipe.sh:8:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 6| # 7| has_cmd () { # 8|-> [[ -n "$2" && "$2" > $($1 --version 2>/dev/null) ]] && return 1 # 9| cmdpath=$(command -v "$1") # 10| [[ -n $cmdpath && -x $cmdpath ]] && return 0 Error: SHELLCHECK_WARNING: [#def56] /usr/bin/lesspipe.sh:8:21: warning[SC3012]: In POSIX sh, lexicographical > is undefined. # 6| # 7| has_cmd () { # 8|-> [[ -n "$2" && "$2" > $($1 --version 2>/dev/null) ]] && return 1 # 9| cmdpath=$(command -v "$1") # 10| [[ -n $cmdpath && -x $cmdpath ]] && return 0 Error: SHELLCHECK_WARNING: [#def57] /usr/bin/lesspipe.sh:10:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 8| [[ -n "$2" && "$2" > $($1 --version 2>/dev/null) ]] && return 1 # 9| cmdpath=$(command -v "$1") # 10|-> [[ -n $cmdpath && -x $cmdpath ]] && return 0 # 11| return 1 # 12| } Error: SHELLCHECK_WARNING: [#def58] /usr/bin/lesspipe.sh:27:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 25| # do not depend on the file extension, if possible # 26| fname="$1" # 27|-> if [[ "$1" == - || -z $1 ]]; then # 28| t=$(nexttmp) # 29| head -c 1000000 > "$t" Error: SHELLCHECK_WARNING: [#def59] /usr/bin/lesspipe.sh:27:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 25| # do not depend on the file extension, if possible # 26| fname="$1" # 27|-> if [[ "$1" == - || -z $1 ]]; then # 28| t=$(nexttmp) # 29| head -c 1000000 > "$t" Error: SHELLCHECK_WARNING: [#def60] /usr/bin/lesspipe.sh:30:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 28| t=$(nexttmp) # 29| head -c 1000000 > "$t" # 30|-> [[ -z $fileext ]] && fname="$t" || fname="$fileext" # 31| set "$t" "$2" # 32| fi Error: SHELLCHECK_WARNING: [#def61] /usr/bin/lesspipe.sh:36:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 34| ### get file type from mime type # 35| ft=$(file -L -s -b --mime "$1" 2> /dev/null) # 36|-> [[ $ft == *=* ]] && fchar="${ft##*=}" || fchar=utf-8 # 37| fcat="${ft%/*}" # 38| ft="${ft#*/}"; ft="${ft%;*}"; ft="${ft#x-script.}"; ft="${ft#x-}" Error: SHELLCHECK_WARNING: [#def62] /usr/bin/lesspipe.sh:36:9: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 34| ### get file type from mime type # 35| ft=$(file -L -s -b --mime "$1" 2> /dev/null) # 36|-> [[ $ft == *=* ]] && fchar="${ft##*=}" || fchar=utf-8 # 37| fcat="${ft%/*}" # 38| ft="${ft#*/}"; ft="${ft%;*}"; ft="${ft#x-script.}"; ft="${ft#x-}" Error: SHELLCHECK_WARNING: [#def63] /usr/bin/lesspipe.sh:74:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 72| case "$fext" in # 73| sxi) # 74|-> [[ $ftype == zip ]] && ftype=ooffice1 ;; # 75| epub) # 76| [[ $ftype == zip ]] && ftype=epub ;; Error: SHELLCHECK_WARNING: [#def64] /usr/bin/lesspipe.sh:74:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 72| case "$fext" in # 73| sxi) # 74|-> [[ $ftype == zip ]] && ftype=ooffice1 ;; # 75| epub) # 76| [[ $ftype == zip ]] && ftype=epub ;; Error: SHELLCHECK_WARNING: [#def65] /usr/bin/lesspipe.sh:76:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 74| [[ $ftype == zip ]] && ftype=ooffice1 ;; # 75| epub) # 76|-> [[ $ftype == zip ]] && ftype=epub ;; # 77| ipynb) # 78| [[ $ftype == json ]] && ftype=ipynb ;; Error: SHELLCHECK_WARNING: [#def66] /usr/bin/lesspipe.sh:76:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 74| [[ $ftype == zip ]] && ftype=ooffice1 ;; # 75| epub) # 76|-> [[ $ftype == zip ]] && ftype=epub ;; # 77| ipynb) # 78| [[ $ftype == json ]] && ftype=ipynb ;; Error: SHELLCHECK_WARNING: [#def67] /usr/bin/lesspipe.sh:78:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 76| [[ $ftype == zip ]] && ftype=epub ;; # 77| ipynb) # 78|-> [[ $ftype == json ]] && ftype=ipynb ;; # 79| mp3) # 80| [[ $ftype == mpeg ]] && ftype=mp3 ;; Error: SHELLCHECK_WARNING: [#def68] /usr/bin/lesspipe.sh:78:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 76| [[ $ftype == zip ]] && ftype=epub ;; # 77| ipynb) # 78|-> [[ $ftype == json ]] && ftype=ipynb ;; # 79| mp3) # 80| [[ $ftype == mpeg ]] && ftype=mp3 ;; Error: SHELLCHECK_WARNING: [#def69] /usr/bin/lesspipe.sh:80:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 78| [[ $ftype == json ]] && ftype=ipynb ;; # 79| mp3) # 80|-> [[ $ftype == mpeg ]] && ftype=mp3 ;; # 81| jsx|csv) # 82| [[ $fcat == text ]] && ftype="$fext" ;; Error: SHELLCHECK_WARNING: [#def70] /usr/bin/lesspipe.sh:80:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 78| [[ $ftype == json ]] && ftype=ipynb ;; # 79| mp3) # 80|-> [[ $ftype == mpeg ]] && ftype=mp3 ;; # 81| jsx|csv) # 82| [[ $fcat == text ]] && ftype="$fext" ;; Error: SHELLCHECK_WARNING: [#def71] /usr/bin/lesspipe.sh:82:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 80| [[ $ftype == mpeg ]] && ftype=mp3 ;; # 81| jsx|csv) # 82|-> [[ $fcat == text ]] && ftype="$fext" ;; # 83| tsx) # 84| [[ $fcat == text ]] && ftype=typescript-jsx ;; Error: SHELLCHECK_WARNING: [#def72] /usr/bin/lesspipe.sh:82:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 80| [[ $ftype == mpeg ]] && ftype=mp3 ;; # 81| jsx|csv) # 82|-> [[ $fcat == text ]] && ftype="$fext" ;; # 83| tsx) # 84| [[ $fcat == text ]] && ftype=typescript-jsx ;; Error: SHELLCHECK_WARNING: [#def73] /usr/bin/lesspipe.sh:84:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 82| [[ $fcat == text ]] && ftype="$fext" ;; # 83| tsx) # 84|-> [[ $fcat == text ]] && ftype=typescript-jsx ;; # 85| appimage|AppImage) # 86| [[ $fcat == application && -x "$1" ]] && ftype=appimage ;; Error: SHELLCHECK_WARNING: [#def74] /usr/bin/lesspipe.sh:84:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 82| [[ $fcat == text ]] && ftype="$fext" ;; # 83| tsx) # 84|-> [[ $fcat == text ]] && ftype=typescript-jsx ;; # 85| appimage|AppImage) # 86| [[ $fcat == application && -x "$1" ]] && ftype=appimage ;; Error: SHELLCHECK_WARNING: [#def75] /usr/bin/lesspipe.sh:86:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 84| [[ $fcat == text ]] && ftype=typescript-jsx ;; # 85| appimage|AppImage) # 86|-> [[ $fcat == application && -x "$1" ]] && ftype=appimage ;; # 87| snap) # 88| [[ $fcat == application ]] && ftype="$fext" ;; Error: SHELLCHECK_WARNING: [#def76] /usr/bin/lesspipe.sh:86:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 84| [[ $fcat == text ]] && ftype=typescript-jsx ;; # 85| appimage|AppImage) # 86|-> [[ $fcat == application && -x "$1" ]] && ftype=appimage ;; # 87| snap) # 88| [[ $fcat == application ]] && ftype="$fext" ;; Error: SHELLCHECK_WARNING: [#def77] /usr/bin/lesspipe.sh:88:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 86| [[ $fcat == application && -x "$1" ]] && ftype=appimage ;; # 87| snap) # 88|-> [[ $fcat == application ]] && ftype="$fext" ;; # 89| # do not process dmg files as plain zlib files, if 7z not installed # 90| dmg) Error: SHELLCHECK_WARNING: [#def78] /usr/bin/lesspipe.sh:88:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 86| [[ $fcat == application && -x "$1" ]] && ftype=appimage ;; # 87| snap) # 88|-> [[ $fcat == application ]] && ftype="$fext" ;; # 89| # do not process dmg files as plain zlib files, if 7z not installed # 90| dmg) Error: SHELLCHECK_WARNING: [#def79] /usr/bin/lesspipe.sh:91:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 89| # do not process dmg files as plain zlib files, if 7z not installed # 90| dmg) # 91|-> [[ $ftype == zlib ]] && ftype=dmg ;; # 92| esac # 93| ### get file type from 'file' command for an unspecific result Error: SHELLCHECK_WARNING: [#def80] /usr/bin/lesspipe.sh:91:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 89| # do not process dmg files as plain zlib files, if 7z not installed # 90| dmg) # 91|-> [[ $ftype == zlib ]] && ftype=dmg ;; # 92| esac # 93| ### get file type from 'file' command for an unspecific result Error: SHELLCHECK_WARNING: [#def81] /usr/bin/lesspipe.sh:94:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 92| esac # 93| ### get file type from 'file' command for an unspecific result # 94|-> [[ "$fcat" == message && $ftype == plain ]] && ftype=msg # 95| [[ "$fcat" == message && $ftype == rfc822 ]] && fcat=text && ftype=email # 96| if [[ "$fcat" == application && "$ftype" == octet-stream || "$ftype" == pem-file || "$fcat" == text && $ftype == plain ]]; then Error: SHELLCHECK_WARNING: [#def82] /usr/bin/lesspipe.sh:94:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 92| esac # 93| ### get file type from 'file' command for an unspecific result # 94|-> [[ "$fcat" == message && $ftype == plain ]] && ftype=msg # 95| [[ "$fcat" == message && $ftype == rfc822 ]] && fcat=text && ftype=email # 96| if [[ "$fcat" == application && "$ftype" == octet-stream || "$ftype" == pem-file || "$fcat" == text && $ftype == plain ]]; then Error: SHELLCHECK_WARNING: [#def83] /usr/bin/lesspipe.sh:94:34: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 92| esac # 93| ### get file type from 'file' command for an unspecific result # 94|-> [[ "$fcat" == message && $ftype == plain ]] && ftype=msg # 95| [[ "$fcat" == message && $ftype == rfc822 ]] && fcat=text && ftype=email # 96| if [[ "$fcat" == application && "$ftype" == octet-stream || "$ftype" == pem-file || "$fcat" == text && $ftype == plain ]]; then Error: SHELLCHECK_WARNING: [#def84] /usr/bin/lesspipe.sh:95:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 93| ### get file type from 'file' command for an unspecific result # 94| [[ "$fcat" == message && $ftype == plain ]] && ftype=msg # 95|-> [[ "$fcat" == message && $ftype == rfc822 ]] && fcat=text && ftype=email # 96| if [[ "$fcat" == application && "$ftype" == octet-stream || "$ftype" == pem-file || "$fcat" == text && $ftype == plain ]]; then # 97| ft=$(file -L -s -b "$1" 2> /dev/null) Error: SHELLCHECK_WARNING: [#def85] /usr/bin/lesspipe.sh:95:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 93| ### get file type from 'file' command for an unspecific result # 94| [[ "$fcat" == message && $ftype == plain ]] && ftype=msg # 95|-> [[ "$fcat" == message && $ftype == rfc822 ]] && fcat=text && ftype=email # 96| if [[ "$fcat" == application && "$ftype" == octet-stream || "$ftype" == pem-file || "$fcat" == text && $ftype == plain ]]; then # 97| ft=$(file -L -s -b "$1" 2> /dev/null) Error: SHELLCHECK_WARNING: [#def86] /usr/bin/lesspipe.sh:95:34: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 93| ### get file type from 'file' command for an unspecific result # 94| [[ "$fcat" == message && $ftype == plain ]] && ftype=msg # 95|-> [[ "$fcat" == message && $ftype == rfc822 ]] && fcat=text && ftype=email # 96| if [[ "$fcat" == application && "$ftype" == octet-stream || "$ftype" == pem-file || "$fcat" == text && $ftype == plain ]]; then # 97| ft=$(file -L -s -b "$1" 2> /dev/null) Error: SHELLCHECK_WARNING: [#def87] /usr/bin/lesspipe.sh:96:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 94| [[ "$fcat" == message && $ftype == plain ]] && ftype=msg # 95| [[ "$fcat" == message && $ftype == rfc822 ]] && fcat=text && ftype=email # 96|-> if [[ "$fcat" == application && "$ftype" == octet-stream || "$ftype" == pem-file || "$fcat" == text && $ftype == plain ]]; then # 97| ft=$(file -L -s -b "$1" 2> /dev/null) # 98| # first check if the file command yields something Error: SHELLCHECK_WARNING: [#def88] /usr/bin/lesspipe.sh:96:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 94| [[ "$fcat" == message && $ftype == plain ]] && ftype=msg # 95| [[ "$fcat" == message && $ftype == rfc822 ]] && fcat=text && ftype=email # 96|-> if [[ "$fcat" == application && "$ftype" == octet-stream || "$ftype" == pem-file || "$fcat" == text && $ftype == plain ]]; then # 97| ft=$(file -L -s -b "$1" 2> /dev/null) # 98| # first check if the file command yields something Error: SHELLCHECK_WARNING: [#def89] /usr/bin/lesspipe.sh:96:43: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 94| [[ "$fcat" == message && $ftype == plain ]] && ftype=msg # 95| [[ "$fcat" == message && $ftype == rfc822 ]] && fcat=text && ftype=email # 96|-> if [[ "$fcat" == application && "$ftype" == octet-stream || "$ftype" == pem-file || "$fcat" == text && $ftype == plain ]]; then # 97| ft=$(file -L -s -b "$1" 2> /dev/null) # 98| # first check if the file command yields something Error: SHELLCHECK_WARNING: [#def90] /usr/bin/lesspipe.sh:96:71: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 94| [[ "$fcat" == message && $ftype == plain ]] && ftype=msg # 95| [[ "$fcat" == message && $ftype == rfc822 ]] && fcat=text && ftype=email # 96|-> if [[ "$fcat" == application && "$ftype" == octet-stream || "$ftype" == pem-file || "$fcat" == text && $ftype == plain ]]; then # 97| ft=$(file -L -s -b "$1" 2> /dev/null) # 98| # first check if the file command yields something Error: SHELLCHECK_WARNING: [#def91] /usr/bin/lesspipe.sh:96:94: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 94| [[ "$fcat" == message && $ftype == plain ]] && ftype=msg # 95| [[ "$fcat" == message && $ftype == rfc822 ]] && fcat=text && ftype=email # 96|-> if [[ "$fcat" == application && "$ftype" == octet-stream || "$ftype" == pem-file || "$fcat" == text && $ftype == plain ]]; then # 97| ft=$(file -L -s -b "$1" 2> /dev/null) # 98| # first check if the file command yields something Error: SHELLCHECK_WARNING: [#def92] /usr/bin/lesspipe.sh:96:112: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 94| [[ "$fcat" == message && $ftype == plain ]] && ftype=msg # 95| [[ "$fcat" == message && $ftype == rfc822 ]] && fcat=text && ftype=email # 96|-> if [[ "$fcat" == application && "$ftype" == octet-stream || "$ftype" == pem-file || "$fcat" == text && $ftype == plain ]]; then # 97| ft=$(file -L -s -b "$1" 2> /dev/null) # 98| # first check if the file command yields something Error: SHELLCHECK_WARNING: [#def93] /usr/bin/lesspipe.sh:142:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 140| ftype="$fext" ;; # 141| esac # 142|-> if [[ $fchar != binary ]]; then # 143| # text only file formats # 144| case "$fext" in Error: SHELLCHECK_WARNING: [#def94] /usr/bin/lesspipe.sh:161:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 159| # 160| msg () { # 161|-> [[ -n "$LESSQUIET" ]] && return; # 162| if [[ -n "$lesspipe_version" ]]; then # 163| echo "==> (lesspipe $lesspipe_version) $*" Error: SHELLCHECK_WARNING: [#def95] /usr/bin/lesspipe.sh:162:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 160| msg () { # 161| [[ -n "$LESSQUIET" ]] && return; # 162|-> if [[ -n "$lesspipe_version" ]]; then # 163| echo "==> (lesspipe $lesspipe_version) $*" # 164| else Error: SHELLCHECK_WARNING: [#def96] /usr/bin/lesspipe.sh:173:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 171| a="===================================" # 172| word="Contents" # 173|-> [[ -n $1 ]] && word=$1 # 174| echo "$a $word $a" # 175| } Error: SHELLCHECK_WARNING: [#def97] /usr/bin/lesspipe.sh:180:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 178| new=$(mktemp "$tmpdir/lesspipeXXXXXX") # 179| # Use the file extension from the original filename if available # 180|-> if [[ -n "$fileext" && "$fileext" == *.* ]]; then # 181| suffix="${fileext##*/}" # 182| suffix="${suffix##*.}" Error: SHELLCHECK_WARNING: [#def98] /usr/bin/lesspipe.sh:180:36: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 178| new=$(mktemp "$tmpdir/lesspipeXXXXXX") # 179| # Use the file extension from the original filename if available # 180|-> if [[ -n "$fileext" && "$fileext" == *.* ]]; then # 181| suffix="${fileext##*/}" # 182| suffix="${suffix##*.}" Error: SHELLCHECK_WARNING: [#def99] /usr/bin/lesspipe.sh:183:7: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 181| suffix="${fileext##*/}" # 182| suffix="${suffix##*.}" # 183|-> elif [[ -z "$1" ]]; then # 184| suffix="${ft%%:*}" # 185| else Error: SHELLCHECK_WARNING: [#def100] /usr/bin/lesspipe.sh:196:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 194| prog="$1" # 195| shift # 196|-> if [[ "$1" == - ]]; then # 197| shift # 198| t=$(nexttmp) Error: SHELLCHECK_WARNING: [#def101] /usr/bin/lesspipe.sh:196:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 194| prog="$1" # 195| shift # 196|-> if [[ "$1" == - ]]; then # 197| shift # 198| t=$(nexttmp) Error: SHELLCHECK_WARNING: [#def102] /usr/bin/lesspipe.sh:209:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 207| prog="$1" # 208| shift # 209|-> [[ "$1" == - ]] && shift # 210| $prog "$@" # 211| } Error: SHELLCHECK_WARNING: [#def103] /usr/bin/lesspipe.sh:209:10: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 207| prog="$1" # 208| shift # 209|-> [[ "$1" == - ]] && shift # 210| $prog "$@" # 211| } Error: SHELLCHECK_WARNING: [#def104] /usr/bin/lesspipe.sh:214:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 212| # 213| show () { # 214|-> if [[ "$1" == https://* ]]; then # 215| x=html # 216| isfinal "$1" Error: SHELLCHECK_WARNING: [#def105] /usr/bin/lesspipe.sh:214:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 212| # 213| show () { # 214|-> if [[ "$1" == https://* ]]; then # 215| x=html # 216| isfinal "$1" Error: SHELLCHECK_WARNING: [#def106] /usr/bin/lesspipe.sh:221:8: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 219| file1="${1%%"$sep"*}" # 220| rest1="${1#"$file1"}" # 221|-> while [[ "$rest1" == "$sep$sep"* ]]; do # 222| [[ "$rest1" == "$sep$sep" ]] && break # 223| rest1="${rest1#"$sep$sep"}" Error: SHELLCHECK_WARNING: [#def107] /usr/bin/lesspipe.sh:221:20: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 219| file1="${1%%"$sep"*}" # 220| rest1="${1#"$file1"}" # 221|-> while [[ "$rest1" == "$sep$sep"* ]]; do # 222| [[ "$rest1" == "$sep$sep" ]] && break # 223| rest1="${rest1#"$sep$sep"}" Error: SHELLCHECK_WARNING: [#def108] /usr/bin/lesspipe.sh:222:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 220| rest1="${1#"$file1"}" # 221| while [[ "$rest1" == "$sep$sep"* ]]; do # 222|-> [[ "$rest1" == "$sep$sep" ]] && break # 223| rest1="${rest1#"$sep$sep"}" # 224| file1="${rest1%%"$sep"*}" Error: SHELLCHECK_WARNING: [#def109] /usr/bin/lesspipe.sh:222:15: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 220| rest1="${1#"$file1"}" # 221| while [[ "$rest1" == "$sep$sep"* ]]; do # 222|-> [[ "$rest1" == "$sep$sep" ]] && break # 223| rest1="${rest1#"$sep$sep"}" # 224| file1="${rest1%%"$sep"*}" Error: SHELLCHECK_WARNING: [#def110] /usr/bin/lesspipe.sh:228:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 226| file1="${1%"$rest1"}" # 227| done # 228|-> [[ ! -e "$file1" && "$file1" != '-' ]] && exit 1 # 229| rest11="${rest1#"$sep"}" # 230| file2="${rest11%%"$sep"*}" Error: SHELLCHECK_WARNING: [#def111] /usr/bin/lesspipe.sh:232:8: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 230| file2="${rest11%%"$sep"*}" # 231| rest2="${rest11#"$file2"}" # 232|-> while [[ "$rest2" == "$sep$sep"* ]]; do # 233| [[ "$rest2" == "$sep$sep" ]] && break # 234| rest2="${rest2#"$sep$sep"}" Error: SHELLCHECK_WARNING: [#def112] /usr/bin/lesspipe.sh:232:20: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 230| file2="${rest11%%"$sep"*}" # 231| rest2="${rest11#"$file2"}" # 232|-> while [[ "$rest2" == "$sep$sep"* ]]; do # 233| [[ "$rest2" == "$sep$sep" ]] && break # 234| rest2="${rest2#"$sep$sep"}" Error: SHELLCHECK_WARNING: [#def113] /usr/bin/lesspipe.sh:233:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 231| rest2="${rest11#"$file2"}" # 232| while [[ "$rest2" == "$sep$sep"* ]]; do # 233|-> [[ "$rest2" == "$sep$sep" ]] && break # 234| rest2="${rest2#"$sep$sep"}" # 235| file2="${rest2%%"$sep"*}" Error: SHELLCHECK_WARNING: [#def114] /usr/bin/lesspipe.sh:233:15: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 231| rest2="${rest11#"$file2"}" # 232| while [[ "$rest2" == "$sep$sep"* ]]; do # 233|-> [[ "$rest2" == "$sep$sep" ]] && break # 234| rest2="${rest2#"$sep$sep"}" # 235| file2="${rest2%%"$sep"*}" Error: SHELLCHECK_WARNING: [#def115] /usr/bin/lesspipe.sh:242:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 240| rest11="$rest1" # 241| # 242|-> if [[ "${cmd[*]}" == "" ]]; then # 243| ft=$(filetype "$file1") # 244| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def116] /usr/bin/lesspipe.sh:242:9: warning[SC3054]: In POSIX sh, array references are undefined. # 240| rest11="$rest1" # 241| # 242|-> if [[ "${cmd[*]}" == "" ]]; then # 243| ft=$(filetype "$file1") # 244| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def117] /usr/bin/lesspipe.sh:242:20: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 240| rest11="$rest1" # 241| # 242|-> if [[ "${cmd[*]}" == "" ]]; then # 243| ft=$(filetype "$file1") # 244| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def118] /usr/bin/lesspipe.sh:245:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 243| ft=$(filetype "$file1") # 244| get_unpack_cmd "$ft" "$file1" "$rest1" # 245|-> if [[ "${cmd[*]}" != "" ]]; then # 246| show "-$rest1" # 247| else Error: SHELLCHECK_WARNING: [#def119] /usr/bin/lesspipe.sh:245:10: warning[SC3054]: In POSIX sh, array references are undefined. # 243| ft=$(filetype "$file1") # 244| get_unpack_cmd "$ft" "$file1" "$rest1" # 245|-> if [[ "${cmd[*]}" != "" ]]; then # 246| show "-$rest1" # 247| else Error: SHELLCHECK_WARNING: [#def120] /usr/bin/lesspipe.sh:251:7: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 249| isfinal "$file1" "$rest11" # 250| fi # 251|-> elif [[ "$c1" == "" ]]; then # 252| c1=("${cmd[@]}") # 253| ft=$("${c1[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def121] /usr/bin/lesspipe.sh:251:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 249| isfinal "$file1" "$rest11" # 250| fi # 251|-> elif [[ "$c1" == "" ]]; then # 252| c1=("${cmd[@]}") # 253| ft=$("${c1[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def122] /usr/bin/lesspipe.sh:252:6: warning[SC3030]: In POSIX sh, arrays are undefined. # 250| fi # 251| elif [[ "$c1" == "" ]]; then # 252|-> c1=("${cmd[@]}") # 253| ft=$("${c1[@]}" | filetype -) || exit 1 # 254| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def123] /usr/bin/lesspipe.sh:252:8: warning[SC3054]: In POSIX sh, array references are undefined. # 250| fi # 251| elif [[ "$c1" == "" ]]; then # 252|-> c1=("${cmd[@]}") # 253| ft=$("${c1[@]}" | filetype -) || exit 1 # 254| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def124] /usr/bin/lesspipe.sh:253:9: warning[SC3054]: In POSIX sh, array references are undefined. # 251| elif [[ "$c1" == "" ]]; then # 252| c1=("${cmd[@]}") # 253|-> ft=$("${c1[@]}" | filetype -) || exit 1 # 254| get_unpack_cmd "$ft" "$file1" "$rest1" # 255| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def125] /usr/bin/lesspipe.sh:255:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 253| ft=$("${c1[@]}" | filetype -) || exit 1 # 254| get_unpack_cmd "$ft" "$file1" "$rest1" # 255|-> if [[ "${cmd[*]}" != "" ]]; then # 256| show "-$rest1" # 257| else Error: SHELLCHECK_WARNING: [#def126] /usr/bin/lesspipe.sh:255:10: warning[SC3054]: In POSIX sh, array references are undefined. # 253| ft=$("${c1[@]}" | filetype -) || exit 1 # 254| get_unpack_cmd "$ft" "$file1" "$rest1" # 255|-> if [[ "${cmd[*]}" != "" ]]; then # 256| show "-$rest1" # 257| else Error: SHELLCHECK_WARNING: [#def127] /usr/bin/lesspipe.sh:258:5: warning[SC3054]: In POSIX sh, array references are undefined. # 256| show "-$rest1" # 257| else # 258|-> "${c1[@]}" | isfinal - "$rest11" # 259| fi # 260| elif [[ "$c2" == "" ]]; then Error: SHELLCHECK_WARNING: [#def128] /usr/bin/lesspipe.sh:260:7: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 258| "${c1[@]}" | isfinal - "$rest11" # 259| fi # 260|-> elif [[ "$c2" == "" ]]; then # 261| c2=("${cmd[@]}") # 262| ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def129] /usr/bin/lesspipe.sh:260:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 258| "${c1[@]}" | isfinal - "$rest11" # 259| fi # 260|-> elif [[ "$c2" == "" ]]; then # 261| c2=("${cmd[@]}") # 262| ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def130] /usr/bin/lesspipe.sh:261:6: warning[SC3030]: In POSIX sh, arrays are undefined. # 259| fi # 260| elif [[ "$c2" == "" ]]; then # 261|-> c2=("${cmd[@]}") # 262| ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 # 263| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def131] /usr/bin/lesspipe.sh:261:8: warning[SC3054]: In POSIX sh, array references are undefined. # 259| fi # 260| elif [[ "$c2" == "" ]]; then # 261|-> c2=("${cmd[@]}") # 262| ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 # 263| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def132] /usr/bin/lesspipe.sh:262:9: warning[SC3054]: In POSIX sh, array references are undefined. # 260| elif [[ "$c2" == "" ]]; then # 261| c2=("${cmd[@]}") # 262|-> ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 # 263| get_unpack_cmd "$ft" "$file1" "$rest1" # 264| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def133] /usr/bin/lesspipe.sh:262:22: warning[SC3054]: In POSIX sh, array references are undefined. # 260| elif [[ "$c2" == "" ]]; then # 261| c2=("${cmd[@]}") # 262|-> ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 # 263| get_unpack_cmd "$ft" "$file1" "$rest1" # 264| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def134] /usr/bin/lesspipe.sh:264:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 262| ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 # 263| get_unpack_cmd "$ft" "$file1" "$rest1" # 264|-> if [[ "${cmd[*]}" != "" ]]; then # 265| show "-$rest1" # 266| else Error: SHELLCHECK_WARNING: [#def135] /usr/bin/lesspipe.sh:264:10: warning[SC3054]: In POSIX sh, array references are undefined. # 262| ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 # 263| get_unpack_cmd "$ft" "$file1" "$rest1" # 264|-> if [[ "${cmd[*]}" != "" ]]; then # 265| show "-$rest1" # 266| else Error: SHELLCHECK_WARNING: [#def136] /usr/bin/lesspipe.sh:267:5: warning[SC3054]: In POSIX sh, array references are undefined. # 265| show "-$rest1" # 266| else # 267|-> "${c1[@]}" | "${c2[@]}" | isfinal - "$rest11" # 268| fi # 269| elif [[ "$c3" == "" ]]; then Error: SHELLCHECK_WARNING: [#def137] /usr/bin/lesspipe.sh:267:18: warning[SC3054]: In POSIX sh, array references are undefined. # 265| show "-$rest1" # 266| else # 267|-> "${c1[@]}" | "${c2[@]}" | isfinal - "$rest11" # 268| fi # 269| elif [[ "$c3" == "" ]]; then Error: SHELLCHECK_WARNING: [#def138] /usr/bin/lesspipe.sh:269:7: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 267| "${c1[@]}" | "${c2[@]}" | isfinal - "$rest11" # 268| fi # 269|-> elif [[ "$c3" == "" ]]; then # 270| c3=("${cmd[@]}") # 271| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def139] /usr/bin/lesspipe.sh:269:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 267| "${c1[@]}" | "${c2[@]}" | isfinal - "$rest11" # 268| fi # 269|-> elif [[ "$c3" == "" ]]; then # 270| c3=("${cmd[@]}") # 271| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def140] /usr/bin/lesspipe.sh:270:6: warning[SC3030]: In POSIX sh, arrays are undefined. # 268| fi # 269| elif [[ "$c3" == "" ]]; then # 270|-> c3=("${cmd[@]}") # 271| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 # 272| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def141] /usr/bin/lesspipe.sh:270:8: warning[SC3054]: In POSIX sh, array references are undefined. # 268| fi # 269| elif [[ "$c3" == "" ]]; then # 270|-> c3=("${cmd[@]}") # 271| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 # 272| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def142] /usr/bin/lesspipe.sh:271:9: warning[SC3054]: In POSIX sh, array references are undefined. # 269| elif [[ "$c3" == "" ]]; then # 270| c3=("${cmd[@]}") # 271|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 # 272| get_unpack_cmd "$ft" "$file1" "$rest1" # 273| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def143] /usr/bin/lesspipe.sh:271:22: warning[SC3054]: In POSIX sh, array references are undefined. # 269| elif [[ "$c3" == "" ]]; then # 270| c3=("${cmd[@]}") # 271|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 # 272| get_unpack_cmd "$ft" "$file1" "$rest1" # 273| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def144] /usr/bin/lesspipe.sh:271:35: warning[SC3054]: In POSIX sh, array references are undefined. # 269| elif [[ "$c3" == "" ]]; then # 270| c3=("${cmd[@]}") # 271|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 # 272| get_unpack_cmd "$ft" "$file1" "$rest1" # 273| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def145] /usr/bin/lesspipe.sh:273:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 271| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 # 272| get_unpack_cmd "$ft" "$file1" "$rest1" # 273|-> if [[ "${cmd[*]}" != "" ]]; then # 274| show "-$rest1" # 275| else Error: SHELLCHECK_WARNING: [#def146] /usr/bin/lesspipe.sh:273:10: warning[SC3054]: In POSIX sh, array references are undefined. # 271| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 # 272| get_unpack_cmd "$ft" "$file1" "$rest1" # 273|-> if [[ "${cmd[*]}" != "" ]]; then # 274| show "-$rest1" # 275| else Error: SHELLCHECK_WARNING: [#def147] /usr/bin/lesspipe.sh:276:5: warning[SC3054]: In POSIX sh, array references are undefined. # 274| show "-$rest1" # 275| else # 276|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | isfinal - "$rest11" # 277| fi # 278| elif [[ "$c4" == "" ]]; then Error: SHELLCHECK_WARNING: [#def148] /usr/bin/lesspipe.sh:276:18: warning[SC3054]: In POSIX sh, array references are undefined. # 274| show "-$rest1" # 275| else # 276|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | isfinal - "$rest11" # 277| fi # 278| elif [[ "$c4" == "" ]]; then Error: SHELLCHECK_WARNING: [#def149] /usr/bin/lesspipe.sh:276:31: warning[SC3054]: In POSIX sh, array references are undefined. # 274| show "-$rest1" # 275| else # 276|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | isfinal - "$rest11" # 277| fi # 278| elif [[ "$c4" == "" ]]; then Error: SHELLCHECK_WARNING: [#def150] /usr/bin/lesspipe.sh:278:7: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 276| "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | isfinal - "$rest11" # 277| fi # 278|-> elif [[ "$c4" == "" ]]; then # 279| c4=("${cmd[@]}") # 280| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def151] /usr/bin/lesspipe.sh:278:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 276| "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | isfinal - "$rest11" # 277| fi # 278|-> elif [[ "$c4" == "" ]]; then # 279| c4=("${cmd[@]}") # 280| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def152] /usr/bin/lesspipe.sh:279:6: warning[SC3030]: In POSIX sh, arrays are undefined. # 277| fi # 278| elif [[ "$c4" == "" ]]; then # 279|-> c4=("${cmd[@]}") # 280| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 281| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def153] /usr/bin/lesspipe.sh:279:8: warning[SC3054]: In POSIX sh, array references are undefined. # 277| fi # 278| elif [[ "$c4" == "" ]]; then # 279|-> c4=("${cmd[@]}") # 280| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 281| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def154] /usr/bin/lesspipe.sh:280:9: warning[SC3054]: In POSIX sh, array references are undefined. # 278| elif [[ "$c4" == "" ]]; then # 279| c4=("${cmd[@]}") # 280|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 281| get_unpack_cmd "$ft" "$file1" "$rest1" # 282| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def155] /usr/bin/lesspipe.sh:280:22: warning[SC3054]: In POSIX sh, array references are undefined. # 278| elif [[ "$c4" == "" ]]; then # 279| c4=("${cmd[@]}") # 280|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 281| get_unpack_cmd "$ft" "$file1" "$rest1" # 282| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def156] /usr/bin/lesspipe.sh:280:35: warning[SC3054]: In POSIX sh, array references are undefined. # 278| elif [[ "$c4" == "" ]]; then # 279| c4=("${cmd[@]}") # 280|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 281| get_unpack_cmd "$ft" "$file1" "$rest1" # 282| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def157] /usr/bin/lesspipe.sh:280:48: warning[SC3054]: In POSIX sh, array references are undefined. # 278| elif [[ "$c4" == "" ]]; then # 279| c4=("${cmd[@]}") # 280|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 281| get_unpack_cmd "$ft" "$file1" "$rest1" # 282| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def158] /usr/bin/lesspipe.sh:282:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 280| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 281| get_unpack_cmd "$ft" "$file1" "$rest1" # 282|-> if [[ "${cmd[*]}" != "" ]]; then # 283| show "-$rest1" # 284| else Error: SHELLCHECK_WARNING: [#def159] /usr/bin/lesspipe.sh:282:10: warning[SC3054]: In POSIX sh, array references are undefined. # 280| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 281| get_unpack_cmd "$ft" "$file1" "$rest1" # 282|-> if [[ "${cmd[*]}" != "" ]]; then # 283| show "-$rest1" # 284| else Error: SHELLCHECK_WARNING: [#def160] /usr/bin/lesspipe.sh:285:5: warning[SC3054]: In POSIX sh, array references are undefined. # 283| show "-$rest1" # 284| else # 285|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | isfinal - "$rest11" # 286| fi # 287| elif [[ "$c5" == "" ]]; then Error: SHELLCHECK_WARNING: [#def161] /usr/bin/lesspipe.sh:285:18: warning[SC3054]: In POSIX sh, array references are undefined. # 283| show "-$rest1" # 284| else # 285|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | isfinal - "$rest11" # 286| fi # 287| elif [[ "$c5" == "" ]]; then Error: SHELLCHECK_WARNING: [#def162] /usr/bin/lesspipe.sh:285:31: warning[SC3054]: In POSIX sh, array references are undefined. # 283| show "-$rest1" # 284| else # 285|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | isfinal - "$rest11" # 286| fi # 287| elif [[ "$c5" == "" ]]; then Error: SHELLCHECK_WARNING: [#def163] /usr/bin/lesspipe.sh:285:44: warning[SC3054]: In POSIX sh, array references are undefined. # 283| show "-$rest1" # 284| else # 285|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | isfinal - "$rest11" # 286| fi # 287| elif [[ "$c5" == "" ]]; then Error: SHELLCHECK_WARNING: [#def164] /usr/bin/lesspipe.sh:287:7: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 285| "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | isfinal - "$rest11" # 286| fi # 287|-> elif [[ "$c5" == "" ]]; then # 288| c5=("${cmd[@]}") # 289| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def165] /usr/bin/lesspipe.sh:287:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 285| "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | isfinal - "$rest11" # 286| fi # 287|-> elif [[ "$c5" == "" ]]; then # 288| c5=("${cmd[@]}") # 289| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def166] /usr/bin/lesspipe.sh:288:6: warning[SC3030]: In POSIX sh, arrays are undefined. # 286| fi # 287| elif [[ "$c5" == "" ]]; then # 288|-> c5=("${cmd[@]}") # 289| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 290| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def167] /usr/bin/lesspipe.sh:288:8: warning[SC3054]: In POSIX sh, array references are undefined. # 286| fi # 287| elif [[ "$c5" == "" ]]; then # 288|-> c5=("${cmd[@]}") # 289| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 290| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def168] /usr/bin/lesspipe.sh:289:9: warning[SC3054]: In POSIX sh, array references are undefined. # 287| elif [[ "$c5" == "" ]]; then # 288| c5=("${cmd[@]}") # 289|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 290| get_unpack_cmd "$ft" "$file1" "$rest1" # 291| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def169] /usr/bin/lesspipe.sh:289:22: warning[SC3054]: In POSIX sh, array references are undefined. # 287| elif [[ "$c5" == "" ]]; then # 288| c5=("${cmd[@]}") # 289|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 290| get_unpack_cmd "$ft" "$file1" "$rest1" # 291| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def170] /usr/bin/lesspipe.sh:289:35: warning[SC3054]: In POSIX sh, array references are undefined. # 287| elif [[ "$c5" == "" ]]; then # 288| c5=("${cmd[@]}") # 289|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 290| get_unpack_cmd "$ft" "$file1" "$rest1" # 291| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def171] /usr/bin/lesspipe.sh:289:48: warning[SC3054]: In POSIX sh, array references are undefined. # 287| elif [[ "$c5" == "" ]]; then # 288| c5=("${cmd[@]}") # 289|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 290| get_unpack_cmd "$ft" "$file1" "$rest1" # 291| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def172] /usr/bin/lesspipe.sh:289:61: warning[SC3054]: In POSIX sh, array references are undefined. # 287| elif [[ "$c5" == "" ]]; then # 288| c5=("${cmd[@]}") # 289|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 290| get_unpack_cmd "$ft" "$file1" "$rest1" # 291| if [[ "${cmd[*]}" != "" ]]; then Error: SHELLCHECK_WARNING: [#def173] /usr/bin/lesspipe.sh:291:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 289| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 290| get_unpack_cmd "$ft" "$file1" "$rest1" # 291|-> if [[ "${cmd[*]}" != "" ]]; then # 292| echo "$0: Too many levels of encapsulation" # 293| else Error: SHELLCHECK_WARNING: [#def174] /usr/bin/lesspipe.sh:291:10: warning[SC3054]: In POSIX sh, array references are undefined. # 289| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 290| get_unpack_cmd "$ft" "$file1" "$rest1" # 291|-> if [[ "${cmd[*]}" != "" ]]; then # 292| echo "$0: Too many levels of encapsulation" # 293| else Error: SHELLCHECK_WARNING: [#def175] /usr/bin/lesspipe.sh:294:5: warning[SC3054]: In POSIX sh, array references are undefined. # 292| echo "$0: Too many levels of encapsulation" # 293| else # 294|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | isfinal - "$rest11" # 295| fi # 296| fi Error: SHELLCHECK_WARNING: [#def176] /usr/bin/lesspipe.sh:294:18: warning[SC3054]: In POSIX sh, array references are undefined. # 292| echo "$0: Too many levels of encapsulation" # 293| else # 294|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | isfinal - "$rest11" # 295| fi # 296| fi Error: SHELLCHECK_WARNING: [#def177] /usr/bin/lesspipe.sh:294:31: warning[SC3054]: In POSIX sh, array references are undefined. # 292| echo "$0: Too many levels of encapsulation" # 293| else # 294|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | isfinal - "$rest11" # 295| fi # 296| fi Error: SHELLCHECK_WARNING: [#def178] /usr/bin/lesspipe.sh:294:44: warning[SC3054]: In POSIX sh, array references are undefined. # 292| echo "$0: Too many levels of encapsulation" # 293| else # 294|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | isfinal - "$rest11" # 295| fi # 296| fi Error: SHELLCHECK_WARNING: [#def179] /usr/bin/lesspipe.sh:294:57: warning[SC3054]: In POSIX sh, array references are undefined. # 292| echo "$0: Too many levels of encapsulation" # 293| else # 294|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | isfinal - "$rest11" # 295| fi # 296| fi Error: SHELLCHECK_WARNING: [#def180] /usr/bin/lesspipe.sh:303:6: warning[SC3030]: In POSIX sh, arrays are undefined. # 301| fcat="${1##*:}" # 302| x="${1%%:*}" # 303|-> cmd=() # 304| [[ "$3" == $sep$sep ]] && return # 305| # uncompress / transform Error: SHELLCHECK_WARNING: [#def181] /usr/bin/lesspipe.sh:304:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 302| x="${1%%:*}" # 303| cmd=() # 304|-> [[ "$3" == $sep$sep ]] && return # 305| # uncompress / transform # 306| case $x in Error: SHELLCHECK_WARNING: [#def182] /usr/bin/lesspipe.sh:304:10: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 302| x="${1%%:*}" # 303| cmd=() # 304|-> [[ "$3" == $sep$sep ]] && return # 305| # uncompress / transform # 306| case $x in Error: SHELLCHECK_WARNING: [#def183] /usr/bin/lesspipe.sh:309:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 307| gzip|bzip2|lzip|lzma|xz|brotli|compress) # 308| # remember name of uncompressed file # 309|-> [[ $2 == - ]] || fileext="$2" # 310| fileext=${fileext%%.gz}; fileext=${fileext%%.bz2} # 311| [[ $x == compress ]] && x=gzip Error: SHELLCHECK_WARNING: [#def184] /usr/bin/lesspipe.sh:309:10: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 307| gzip|bzip2|lzip|lzma|xz|brotli|compress) # 308| # remember name of uncompressed file # 309|-> [[ $2 == - ]] || fileext="$2" # 310| fileext=${fileext%%.gz}; fileext=${fileext%%.bz2} # 311| [[ $x == compress ]] && x=gzip Error: SHELLCHECK_WARNING: [#def185] /usr/bin/lesspipe.sh:311:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 309| [[ $2 == - ]] || fileext="$2" # 310| fileext=${fileext%%.gz}; fileext=${fileext%%.bz2} # 311|-> [[ $x == compress ]] && x=gzip # 312| has_cmd "$x" && cmd=("$x" -cd "$2") ;; # 313| zstd) Error: SHELLCHECK_WARNING: [#def186] /usr/bin/lesspipe.sh:311:10: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 309| [[ $2 == - ]] || fileext="$2" # 310| fileext=${fileext%%.gz}; fileext=${fileext%%.bz2} # 311|-> [[ $x == compress ]] && x=gzip # 312| has_cmd "$x" && cmd=("$x" -cd "$2") ;; # 313| zstd) Error: SHELLCHECK_WARNING: [#def187] /usr/bin/lesspipe.sh:312:24: warning[SC3030]: In POSIX sh, arrays are undefined. # 310| fileext=${fileext%%.gz}; fileext=${fileext%%.bz2} # 311| [[ $x == compress ]] && x=gzip # 312|-> has_cmd "$x" && cmd=("$x" -cd "$2") ;; # 313| zstd) # 314| has_cmd zstd && cmd=(zstd -cdqM1073741824 "$2") ;; Error: SHELLCHECK_WARNING: [#def188] /usr/bin/lesspipe.sh:314:24: warning[SC3030]: In POSIX sh, arrays are undefined. # 312| has_cmd "$x" && cmd=("$x" -cd "$2") ;; # 313| zstd) # 314|-> has_cmd zstd && cmd=(zstd -cdqM1073741824 "$2") ;; # 315| lz4) # 316| has_cmd lz4 && cmd=(lz4 -cdq "$2") ;; Error: SHELLCHECK_WARNING: [#def189] /usr/bin/lesspipe.sh:316:23: warning[SC3030]: In POSIX sh, arrays are undefined. # 314| has_cmd zstd && cmd=(zstd -cdqM1073741824 "$2") ;; # 315| lz4) # 316|-> has_cmd lz4 && cmd=(lz4 -cdq "$2") ;; # 317| # xls(x) output looks better if transformed to csv and then displayed # 318| xlsx) Error: SHELLCHECK_WARNING: [#def190] /usr/bin/lesspipe.sh:319:36: warning[SC3030]: In POSIX sh, arrays are undefined. # 317| # xls(x) output looks better if transformed to csv and then displayed # 318| xlsx) # 319|-> { has_cmd xlsx2csv 0.8.3 && cmd=(xlsx2csv "$2"); } || # 320| { has_cmd in2csv && cmd=(in2csv -f xlsx "$2"); } || # 321| { has_cmd excel2csv && cmd=(istemp excel2csv "$2"); } ;; Error: SHELLCHECK_WARNING: [#def191] /usr/bin/lesspipe.sh:320:28: warning[SC3030]: In POSIX sh, arrays are undefined. # 318| xlsx) # 319| { has_cmd xlsx2csv 0.8.3 && cmd=(xlsx2csv "$2"); } || # 320|-> { has_cmd in2csv && cmd=(in2csv -f xlsx "$2"); } || # 321| { has_cmd excel2csv && cmd=(istemp excel2csv "$2"); } ;; # 322| ms-excel) Error: SHELLCHECK_WARNING: [#def192] /usr/bin/lesspipe.sh:321:31: warning[SC3030]: In POSIX sh, arrays are undefined. # 319| { has_cmd xlsx2csv 0.8.3 && cmd=(xlsx2csv "$2"); } || # 320| { has_cmd in2csv && cmd=(in2csv -f xlsx "$2"); } || # 321|-> { has_cmd excel2csv && cmd=(istemp excel2csv "$2"); } ;; # 322| ms-excel) # 323| { has_cmd in2csv && cmd=(in2csv -f xls "$2"); } || Error: SHELLCHECK_WARNING: [#def193] /usr/bin/lesspipe.sh:323:28: warning[SC3030]: In POSIX sh, arrays are undefined. # 321| { has_cmd excel2csv && cmd=(istemp excel2csv "$2"); } ;; # 322| ms-excel) # 323|-> { has_cmd in2csv && cmd=(in2csv -f xls "$2"); } || # 324| { has_cmd xls2csv && cmd=(istemp xls2csv "$2"); } ;; # 325| esac Error: SHELLCHECK_WARNING: [#def194] /usr/bin/lesspipe.sh:324:29: warning[SC3030]: In POSIX sh, arrays are undefined. # 322| ms-excel) # 323| { has_cmd in2csv && cmd=(in2csv -f xls "$2"); } || # 324|-> { has_cmd xls2csv && cmd=(istemp xls2csv "$2"); } ;; # 325| esac # 326| [[ ${cmd[*]} == '' ]] || return Error: SHELLCHECK_WARNING: [#def195] /usr/bin/lesspipe.sh:326:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 324| { has_cmd xls2csv && cmd=(istemp xls2csv "$2"); } ;; # 325| esac # 326|-> [[ ${cmd[*]} == '' ]] || return # 327| # convert into utf8 # 328| Error: SHELLCHECK_WARNING: [#def196] /usr/bin/lesspipe.sh:326:5: warning[SC3054]: In POSIX sh, array references are undefined. # 324| { has_cmd xls2csv && cmd=(istemp xls2csv "$2"); } ;; # 325| esac # 326|-> [[ ${cmd[*]} == '' ]] || return # 327| # convert into utf8 # 328| Error: SHELLCHECK_WARNING: [#def197] /usr/bin/lesspipe.sh:326:15: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 324| { has_cmd xls2csv && cmd=(istemp xls2csv "$2"); } ;; # 325| esac # 326|-> [[ ${cmd[*]} == '' ]] || return # 327| # convert into utf8 # 328| Error: SHELLCHECK_WARNING: [#def198] /usr/bin/lesspipe.sh:329:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 327| # convert into utf8 # 328| # 329|-> if [[ -n $charmap && $fchar != binary && $fchar != *ascii && $fchar != "$charmap" && $fchar != unknown* ]]; then # 330| qm="\033[7m?\033[m" # inverted question mark # 331| rep=(-c) Error: SHELLCHECK_WARNING: [#def199] /usr/bin/lesspipe.sh:331:7: warning[SC3030]: In POSIX sh, arrays are undefined. # 329| if [[ -n $charmap && $fchar != binary && $fchar != *ascii && $fchar != "$charmap" && $fchar != unknown* ]]; then # 330| qm="\033[7m?\033[m" # inverted question mark # 331|-> rep=(-c) # 332| trans=() # 333| iconv --byte-subst - </dev/null 2>/dev/null && rep=(--unicode-subst="$qm" --byte-subst="$qm" --widechar-subst="$qm") # MacOS Error: SHELLCHECK_WARNING: [#def200] /usr/bin/lesspipe.sh:332:9: warning[SC3030]: In POSIX sh, arrays are undefined. # 330| qm="\033[7m?\033[m" # inverted question mark # 331| rep=(-c) # 332|-> trans=() # 333| iconv --byte-subst - </dev/null 2>/dev/null && rep=(--unicode-subst="$qm" --byte-subst="$qm" --widechar-subst="$qm") # MacOS # 334| iconv -f "$fchar" -t "$charmap//TRANSLIT" - </dev/null 2>/dev/null && trans=(-t "$charmap//TRANSLIT") Error: SHELLCHECK_WARNING: [#def201] /usr/bin/lesspipe.sh:333:54: warning[SC3030]: In POSIX sh, arrays are undefined. # 331| rep=(-c) # 332| trans=() # 333|-> iconv --byte-subst - </dev/null 2>/dev/null && rep=(--unicode-subst="$qm" --byte-subst="$qm" --widechar-subst="$qm") # MacOS # 334| iconv -f "$fchar" -t "$charmap//TRANSLIT" - </dev/null 2>/dev/null && trans=(-t "$charmap//TRANSLIT") # 335| msg "append $sep$sep to filename to view the original $fchar encoded file" Error: SHELLCHECK_WARNING: [#def202] /usr/bin/lesspipe.sh:334:79: warning[SC3030]: In POSIX sh, arrays are undefined. # 332| trans=() # 333| iconv --byte-subst - </dev/null 2>/dev/null && rep=(--unicode-subst="$qm" --byte-subst="$qm" --widechar-subst="$qm") # MacOS # 334|-> iconv -f "$fchar" -t "$charmap//TRANSLIT" - </dev/null 2>/dev/null && trans=(-t "$charmap//TRANSLIT") # 335| msg "append $sep$sep to filename to view the original $fchar encoded file" # 336| cmd=(nodash iconv "${rep[@]}" -f "$fchar" "${trans[@]}" "$2") Error: SHELLCHECK_WARNING: [#def203] /usr/bin/lesspipe.sh:336:7: warning[SC3030]: In POSIX sh, arrays are undefined. # 334| iconv -f "$fchar" -t "$charmap//TRANSLIT" - </dev/null 2>/dev/null && trans=(-t "$charmap//TRANSLIT") # 335| msg "append $sep$sep to filename to view the original $fchar encoded file" # 336|-> cmd=(nodash iconv "${rep[@]}" -f "$fchar" "${trans[@]}" "$2") # 337| # loop protection, just in case # 338| charmap= Error: SHELLCHECK_WARNING: [#def204] /usr/bin/lesspipe.sh:336:22: warning[SC3054]: In POSIX sh, array references are undefined. # 334| iconv -f "$fchar" -t "$charmap//TRANSLIT" - </dev/null 2>/dev/null && trans=(-t "$charmap//TRANSLIT") # 335| msg "append $sep$sep to filename to view the original $fchar encoded file" # 336|-> cmd=(nodash iconv "${rep[@]}" -f "$fchar" "${trans[@]}" "$2") # 337| # loop protection, just in case # 338| charmap= Error: SHELLCHECK_WARNING: [#def205] /usr/bin/lesspipe.sh:336:46: warning[SC3054]: In POSIX sh, array references are undefined. # 334| iconv -f "$fchar" -t "$charmap//TRANSLIT" - </dev/null 2>/dev/null && trans=(-t "$charmap//TRANSLIT") # 335| msg "append $sep$sep to filename to view the original $fchar encoded file" # 336|-> cmd=(nodash iconv "${rep[@]}" -f "$fchar" "${trans[@]}" "$2") # 337| # loop protection, just in case # 338| charmap= Error: SHELLCHECK_WARNING: [#def206] /usr/bin/lesspipe.sh:341:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 339| return # 340| fi # 341|-> [[ "$3" == "$sep" ]] && return # 342| file2=${3#"$sep"} # 343| file2=${file2%%"$sep"*} Error: SHELLCHECK_WARNING: [#def207] /usr/bin/lesspipe.sh:341:10: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 339| return # 340| fi # 341|-> [[ "$3" == "$sep" ]] && return # 342| file2=${3#"$sep"} # 343| file2=${file2%%"$sep"*} Error: SHELLCHECK_WARNING: [#def208] /usr/bin/lesspipe.sh:345:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 343| file2=${file2%%"$sep"*} # 344| # remember name of file to extract or file type # 345|-> [[ -n "$file2" ]] && fileext="$file2" # 346| # extract from archive # 347| rest1="$rest2" Error: SHELLCHECK_WARNING: [#def209] /usr/bin/lesspipe.sh:356:31: warning[SC3030]: In POSIX sh, arrays are undefined. # 354| rpm) # 355| { has_cmd cpio && has_cmd rpm2cpio; } || # 356|-> { has_cmd bsdtar; } && cmd=(isrpm "$2" "$file2") ;; # 357| java-archive|zip) # 358| { has_cmd bsdtar && prog=bsdtar; } || Error: SHELLCHECK_WARNING: [#def210] /usr/bin/lesspipe.sh:361:45: warning[SC3030]: In POSIX sh, arrays are undefined. # 359| { has_cmd unzip && prog=unzip; } ;; # 360| debian*-package) # 361|-> { has_cmd ar || has_cmd bsdtar; } && cmd=(isdeb "$2" "$file2") ;; # 362| rar) # 363| { has_cmd bsdtar && prog=bsdtar; } || Error: SHELLCHECK_WARNING: [#def211] /usr/bin/lesspipe.sh:379:30: warning[SC3030]: In POSIX sh, arrays are undefined. # 377| { has_cmd bsdtar && prog=bsdtar; } ;; # 378| appimage|snap) # 379|-> has_cmd unsquashfs && cmd=(isimage "$x" "$2" "$file2") ;; # 380| esac # 381| # 7z formats and fall back to 7z supported formats Error: SHELLCHECK_WARNING: [#def212] /usr/bin/lesspipe.sh:382:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 380| esac # 381| # 7z formats and fall back to 7z supported formats # 382|-> if [[ -z $prog ]]; then # 383| case "$x" in # 384| dmg) Error: SHELLCHECK_WARNING: [#def213] /usr/bin/lesspipe.sh:393:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 391| esac # 392| fi # 393|-> if [[ "$prog" = ar && "$2" = *@* ]]; then # 394| t=$(nexttmp) # 395| cat "$2" > "$t" Error: SHELLCHECK_WARNING: [#def214] /usr/bin/lesspipe.sh:398:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 396| set "$2" "$t" # 397| fi # 398|-> [[ -n $prog ]] && cmd=(isarchive "$prog" "$2" "$file2") # 399| if [[ -n ${cmd[*]} ]]; then # 400| [[ -n "$file2" ]] && file2= && return Error: SHELLCHECK_WARNING: [#def215] /usr/bin/lesspipe.sh:398:24: warning[SC3030]: In POSIX sh, arrays are undefined. # 396| set "$2" "$t" # 397| fi # 398|-> [[ -n $prog ]] && cmd=(isarchive "$prog" "$2" "$file2") # 399| if [[ -n ${cmd[*]} ]]; then # 400| [[ -n "$file2" ]] && file2= && return Error: SHELLCHECK_WARNING: [#def216] /usr/bin/lesspipe.sh:399:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 397| fi # 398| [[ -n $prog ]] && cmd=(isarchive "$prog" "$2" "$file2") # 399|-> if [[ -n ${cmd[*]} ]]; then # 400| [[ -n "$file2" ]] && file2= && return # 401| msg "use ${x}_file${sep}contained_file to view a file in the archive" Error: SHELLCHECK_WARNING: [#def217] /usr/bin/lesspipe.sh:399:11: warning[SC3054]: In POSIX sh, array references are undefined. # 397| fi # 398| [[ -n $prog ]] && cmd=(isarchive "$prog" "$2" "$file2") # 399|-> if [[ -n ${cmd[*]} ]]; then # 400| [[ -n "$file2" ]] && file2= && return # 401| msg "use ${x}_file${sep}contained_file to view a file in the archive" Error: SHELLCHECK_WARNING: [#def218] /usr/bin/lesspipe.sh:400:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 398| [[ -n $prog ]] && cmd=(isarchive "$prog" "$2" "$file2") # 399| if [[ -n ${cmd[*]} ]]; then # 400|-> [[ -n "$file2" ]] && file2= && return # 401| msg "use ${x}_file${sep}contained_file to view a file in the archive" # 402| if [[ $COLOR = --color=always ]]; then Error: SHELLCHECK_WARNING: [#def219] /usr/bin/lesspipe.sh:402:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 400| [[ -n "$file2" ]] && file2= && return # 401| msg "use ${x}_file${sep}contained_file to view a file in the archive" # 402|-> if [[ $COLOR = --color=always ]]; then # 403| has_cmd archive_color && colorizer=(archive_color) # 404| fi Error: SHELLCHECK_WARNING: [#def220] /usr/bin/lesspipe.sh:403:39: warning[SC3030]: In POSIX sh, arrays are undefined. # 401| msg "use ${x}_file${sep}contained_file to view a file in the archive" # 402| if [[ $COLOR = --color=always ]]; then # 403|-> has_cmd archive_color && colorizer=(archive_color) # 404| fi # 405| fi Error: SHELLCHECK_WARNING: [#def221] /usr/bin/lesspipe.sh:413:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 411| while read -r line; do # 412| arg1=${line%% *}; arg1=${arg1##*/} # 413|-> [[ $arg1 == less ]] && lessarg=$line # 414| done <<< "$cmdtree" # 415| # last argument starting with colon or equal sign is used for piping into less Error: SHELLCHECK_WARNING: [#def222] /usr/bin/lesspipe.sh:413:12: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 411| while read -r line; do # 412| arg1=${line%% *}; arg1=${arg1##*/} # 413|-> [[ $arg1 == less ]] && lessarg=$line # 414| done <<< "$cmdtree" # 415| # last argument starting with colon or equal sign is used for piping into less Error: SHELLCHECK_WARNING: [#def223] /usr/bin/lesspipe.sh:414:7: warning[SC3011]: In POSIX sh, here-strings are undefined. # 412| arg1=${line%% *}; arg1=${arg1##*/} # 413| [[ $arg1 == less ]] && lessarg=$line # 414|-> done <<< "$cmdtree" # 415| # last argument starting with colon or equal sign is used for piping into less # 416| [[ $lessarg == *\ [:=]* ]] && fext=${lessarg#*[:=]} Error: SHELLCHECK_WARNING: [#def224] /usr/bin/lesspipe.sh:416:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 414| done <<< "$cmdtree" # 415| # last argument starting with colon or equal sign is used for piping into less # 416|-> [[ $lessarg == *\ [:=]* ]] && fext=${lessarg#*[:=]} # 417| # return if we want to watch growing files # 418| [[ $lessarg == *less\ *\ : ]] && exit 0 Error: SHELLCHECK_WARNING: [#def225] /usr/bin/lesspipe.sh:416:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 414| done <<< "$cmdtree" # 415| # last argument starting with colon or equal sign is used for piping into less # 416|-> [[ $lessarg == *\ [:=]* ]] && fext=${lessarg#*[:=]} # 417| # return if we want to watch growing files # 418| [[ $lessarg == *less\ *\ : ]] && exit 0 Error: SHELLCHECK_WARNING: [#def226] /usr/bin/lesspipe.sh:418:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 416| [[ $lessarg == *\ [:=]* ]] && fext=${lessarg#*[:=]} # 417| # return if we want to watch growing files # 418|-> [[ $lessarg == *less\ *\ : ]] && exit 0 # 419| [[ $lessarg == *less\ *\+F\ * && $fext != log ]] && exit 0 # 420| # color is set when calling less with -r or -R or LESS contains that option Error: SHELLCHECK_WARNING: [#def227] /usr/bin/lesspipe.sh:418:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 416| [[ $lessarg == *\ [:=]* ]] && fext=${lessarg#*[:=]} # 417| # return if we want to watch growing files # 418|-> [[ $lessarg == *less\ *\ : ]] && exit 0 # 419| [[ $lessarg == *less\ *\+F\ * && $fext != log ]] && exit 0 # 420| # color is set when calling less with -r or -R or LESS contains that option Error: SHELLCHECK_WARNING: [#def228] /usr/bin/lesspipe.sh:419:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 417| # return if we want to watch growing files # 418| [[ $lessarg == *less\ *\ : ]] && exit 0 # 419|-> [[ $lessarg == *less\ *\+F\ * && $fext != log ]] && exit 0 # 420| # color is set when calling less with -r or -R or LESS contains that option # 421| COLOR="--color=auto" Error: SHELLCHECK_WARNING: [#def229] /usr/bin/lesspipe.sh:419:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 417| # return if we want to watch growing files # 418| [[ $lessarg == *less\ *\ : ]] && exit 0 # 419|-> [[ $lessarg == *less\ *\+F\ * && $fext != log ]] && exit 0 # 420| # color is set when calling less with -r or -R or LESS contains that option # 421| COLOR="--color=auto" Error: SHELLCHECK_WARNING: [#def230] /usr/bin/lesspipe.sh:423:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 421| COLOR="--color=auto" # 422| colors=0 # 423|-> [[ $TERM == *256* ]] && colors=256 # 424| has_cmd tput && colors=$(tput colors) # 425| if [[ $colors -ge 8 ]]; then Error: SHELLCHECK_WARNING: [#def231] /usr/bin/lesspipe.sh:423:11: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 421| COLOR="--color=auto" # 422| colors=0 # 423|-> [[ $TERM == *256* ]] && colors=256 # 424| has_cmd tput && colors=$(tput colors) # 425| if [[ $colors -ge 8 ]]; then Error: SHELLCHECK_WARNING: [#def232] /usr/bin/lesspipe.sh:425:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 423| [[ $TERM == *256* ]] && colors=256 # 424| has_cmd tput && colors=$(tput colors) # 425|-> if [[ $colors -ge 8 ]]; then # 426| lessarg="$LESS $lessarg" # 427| # shellcheck disable=SC2206 Error: SHELLCHECK_WARNING: [#def233] /usr/bin/lesspipe.sh:428:12: warning[SC3030]: In POSIX sh, arrays are undefined. # 426| lessarg="$LESS $lessarg" # 427| # shellcheck disable=SC2206 # 428|-> r_string=($lessarg) # 429| for i in "${r_string[@]}" # 430| do Error: SHELLCHECK_WARNING: [#def234] /usr/bin/lesspipe.sh:429:13: warning[SC3054]: In POSIX sh, array references are undefined. # 427| # shellcheck disable=SC2206 # 428| r_string=($lessarg) # 429|-> for i in "${r_string[@]}" # 430| do # 431| [[ $i = --raw-control-chars || $i = --RAW-CONTROL-CHARS ]] && COLOR="--color=always" Error: SHELLCHECK_WARNING: [#def235] /usr/bin/lesspipe.sh:431:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 429| for i in "${r_string[@]}" # 430| do # 431|-> [[ $i = --raw-control-chars || $i = --RAW-CONTROL-CHARS ]] && COLOR="--color=always" # 432| [[ $i = --* ]] && continue # 433| [[ $i = -- ]] && break Error: SHELLCHECK_WARNING: [#def236] /usr/bin/lesspipe.sh:432:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 430| do # 431| [[ $i = --raw-control-chars || $i = --RAW-CONTROL-CHARS ]] && COLOR="--color=always" # 432|-> [[ $i = --* ]] && continue # 433| [[ $i = -- ]] && break # 434| [[ $i =~ ^-[aABcCdeEfFgGiIJKLmMnNqQsSuUwWX~]*[rR] ]] && COLOR="--color=always" Error: SHELLCHECK_WARNING: [#def237] /usr/bin/lesspipe.sh:433:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 431| [[ $i = --raw-control-chars || $i = --RAW-CONTROL-CHARS ]] && COLOR="--color=always" # 432| [[ $i = --* ]] && continue # 433|-> [[ $i = -- ]] && break # 434| [[ $i =~ ^-[aABcCdeEfFgGiIJKLmMnNqQsSuUwWX~]*[rR] ]] && COLOR="--color=always" # 435| done Error: SHELLCHECK_WARNING: [#def238] /usr/bin/lesspipe.sh:434:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 432| [[ $i = --* ]] && continue # 433| [[ $i = -- ]] && break # 434|-> [[ $i =~ ^-[aABcCdeEfFgGiIJKLmMnNqQsSuUwWX~]*[rR] ]] && COLOR="--color=always" # 435| done # 436| fi Error: SHELLCHECK_WARNING: [#def239] /usr/bin/lesspipe.sh:434:10: warning[SC3015]: In POSIX sh, =~ regex matching is undefined. # 432| [[ $i = --* ]] && continue # 433| [[ $i = -- ]] && break # 434|-> [[ $i =~ ^-[aABcCdeEfFgGiIJKLmMnNqQsSuUwWX~]*[rR] ]] && COLOR="--color=always" # 435| done # 436| fi Error: SHELLCHECK_WARNING: [#def240] /usr/bin/lesspipe.sh:442:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 440| prog=${LESSCOLORIZER%% *} # 441| # Handle vim/vimcolor special case # 442|-> [[ $prog == *vimcolor ]] && ! has_cmd vim && ! has_cmd nvim && prog= # 443| if [[ -z $prog ]]; then # 444| for i in nvimpager batcat bat pygmentize e2ansi-cat source-highlight vim nvim code2color ; do Error: SHELLCHECK_WARNING: [#def241] /usr/bin/lesspipe.sh:442:11: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 440| prog=${LESSCOLORIZER%% *} # 441| # Handle vim/vimcolor special case # 442|-> [[ $prog == *vimcolor ]] && ! has_cmd vim && ! has_cmd nvim && prog= # 443| if [[ -z $prog ]]; then # 444| for i in nvimpager batcat bat pygmentize e2ansi-cat source-highlight vim nvim code2color ; do Error: SHELLCHECK_WARNING: [#def242] /usr/bin/lesspipe.sh:443:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 441| # Handle vim/vimcolor special case # 442| [[ $prog == *vimcolor ]] && ! has_cmd vim && ! has_cmd nvim && prog= # 443|-> if [[ -z $prog ]]; then # 444| for i in nvimpager batcat bat pygmentize e2ansi-cat source-highlight vim nvim code2color ; do # 445| has_cmd "$i" && prog=$i && break Error: SHELLCHECK_WARNING: [#def243] /usr/bin/lesspipe.sh:447:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 445| has_cmd "$i" && prog=$i && break # 446| done # 447|-> [[ $prog == *vim ]] && prog=vimcolor # 448| else # 449| has_cmd "$prog" || prog= Error: SHELLCHECK_WARNING: [#def244] /usr/bin/lesspipe.sh:447:12: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 445| has_cmd "$i" && prog=$i && break # 446| done # 447|-> [[ $prog == *vim ]] && prog=vimcolor # 448| else # 449| has_cmd "$prog" || prog= Error: SHELLCHECK_WARNING: [#def245] /usr/bin/lesspipe.sh:457:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 455| prog=$1 # 456| lang=$2 # 457|-> [[ -z $lang ]] && return # 458| case $prog in # 459| bat|batcat) Error: SHELLCHECK_WARNING: [#def246] /usr/bin/lesspipe.sh:470:31: warning[SC3020]: In POSIX sh, &> is undefined. # 468| languages=$($prog --lang-list|sed "s/ =.*//;s/^/:/;s/$/:/;") ;; # 469| pygmentize) # 470|-> $prog -l "$lang" /dev/null &>/dev/null && languages=":$lang:" ;; # 471| e2ansi-cat) # 472| echo ''|e2ansi-cat -- --mode "$lang" - >/dev/null 2>&1 && languages=":$lang:" ;; Error: SHELLCHECK_WARNING: [#def247] /usr/bin/lesspipe.sh:476:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 474| ;; # 475| esac # 476|-> [[ $languages == *:$lang:* ]] || lang= # 477| echo "$lang" # 478| } Error: SHELLCHECK_WARNING: [#def248] /usr/bin/lesspipe.sh:476:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 474| ;; # 475| esac # 476|-> [[ $languages == *:$lang:* ]] || lang= # 477| echo "$lang" # 478| } Error: SHELLCHECK_WARNING: [#def249] /usr/bin/lesspipe.sh:483:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 481| prog=$1 # 482| file=$2 # 483|-> [[ $file == - && -n $final_name ]] && file=$final_name # 484| lang=$3 # 485| case $prog in Error: SHELLCHECK_WARNING: [#def250] /usr/bin/lesspipe.sh:483:11: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 481| prog=$1 # 482| file=$2 # 483|-> [[ $file == - && -n $final_name ]] && file=$final_name # 484| lang=$3 # 485| case $prog in Error: SHELLCHECK_WARNING: [#def251] /usr/bin/lesspipe.sh:488:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 486| pygmentize) # 487| # let pygmentite guess the language if not set and input from pipe # 488|-> [[ -n $lang ]] && opt=(-l "$lang") # 489| [[ $file == - && -z $lang ]] && opt=(-g) # 490| [[ -n $LESSCOLORIZER && $LESSCOLORIZER = *-[OP]\ *style=* ]] && style="${LESSCOLORIZER/*style=/}" Error: SHELLCHECK_WARNING: [#def252] /usr/bin/lesspipe.sh:488:26: warning[SC3030]: In POSIX sh, arrays are undefined. # 486| pygmentize) # 487| # let pygmentite guess the language if not set and input from pipe # 488|-> [[ -n $lang ]] && opt=(-l "$lang") # 489| [[ $file == - && -z $lang ]] && opt=(-g) # 490| [[ -n $LESSCOLORIZER && $LESSCOLORIZER = *-[OP]\ *style=* ]] && style="${LESSCOLORIZER/*style=/}" Error: SHELLCHECK_WARNING: [#def253] /usr/bin/lesspipe.sh:489:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 487| # let pygmentite guess the language if not set and input from pipe # 488| [[ -n $lang ]] && opt=(-l "$lang") # 489|-> [[ $file == - && -z $lang ]] && opt=(-g) # 490| [[ -n $LESSCOLORIZER && $LESSCOLORIZER = *-[OP]\ *style=* ]] && style="${LESSCOLORIZER/*style=/}" # 491| [[ -n $style ]] && opt+=(-O style="${style%% *}") Error: SHELLCHECK_WARNING: [#def254] /usr/bin/lesspipe.sh:489:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 487| # let pygmentite guess the language if not set and input from pipe # 488| [[ -n $lang ]] && opt=(-l "$lang") # 489|-> [[ $file == - && -z $lang ]] && opt=(-g) # 490| [[ -n $LESSCOLORIZER && $LESSCOLORIZER = *-[OP]\ *style=* ]] && style="${LESSCOLORIZER/*style=/}" # 491| [[ -n $style ]] && opt+=(-O style="${style%% *}") Error: SHELLCHECK_WARNING: [#def255] /usr/bin/lesspipe.sh:489:40: warning[SC3030]: In POSIX sh, arrays are undefined. # 487| # let pygmentite guess the language if not set and input from pipe # 488| [[ -n $lang ]] && opt=(-l "$lang") # 489|-> [[ $file == - && -z $lang ]] && opt=(-g) # 490| [[ -n $LESSCOLORIZER && $LESSCOLORIZER = *-[OP]\ *style=* ]] && style="${LESSCOLORIZER/*style=/}" # 491| [[ -n $style ]] && opt+=(-O style="${style%% *}") Error: SHELLCHECK_WARNING: [#def256] /usr/bin/lesspipe.sh:490:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 488| [[ -n $lang ]] && opt=(-l "$lang") # 489| [[ $file == - && -z $lang ]] && opt=(-g) # 490|-> [[ -n $LESSCOLORIZER && $LESSCOLORIZER = *-[OP]\ *style=* ]] && style="${LESSCOLORIZER/*style=/}" # 491| [[ -n $style ]] && opt+=(-O style="${style%% *}") # 492| [[ $colors -ge 256 ]] && opt+=(-f terminal256) Error: SHELLCHECK_WARNING: [#def257] /usr/bin/lesspipe.sh:490:75: warning[SC3060]: In POSIX sh, string replacement is undefined. # 488| [[ -n $lang ]] && opt=(-l "$lang") # 489| [[ $file == - && -z $lang ]] && opt=(-g) # 490|-> [[ -n $LESSCOLORIZER && $LESSCOLORIZER = *-[OP]\ *style=* ]] && style="${LESSCOLORIZER/*style=/}" # 491| [[ -n $style ]] && opt+=(-O style="${style%% *}") # 492| [[ $colors -ge 256 ]] && opt+=(-f terminal256) Error: SHELLCHECK_WARNING: [#def258] /usr/bin/lesspipe.sh:491:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 489| [[ $file == - && -z $lang ]] && opt=(-g) # 490| [[ -n $LESSCOLORIZER && $LESSCOLORIZER = *-[OP]\ *style=* ]] && style="${LESSCOLORIZER/*style=/}" # 491|-> [[ -n $style ]] && opt+=(-O style="${style%% *}") # 492| [[ $colors -ge 256 ]] && opt+=(-f terminal256) # 493| [[ "$file" == - ]] || opt+=("$file") ;; Error: SHELLCHECK_WARNING: [#def259] /usr/bin/lesspipe.sh:491:23: warning[SC3024]: In POSIX sh, += is undefined. # 489| [[ $file == - && -z $lang ]] && opt=(-g) # 490| [[ -n $LESSCOLORIZER && $LESSCOLORIZER = *-[OP]\ *style=* ]] && style="${LESSCOLORIZER/*style=/}" # 491|-> [[ -n $style ]] && opt+=(-O style="${style%% *}") # 492| [[ $colors -ge 256 ]] && opt+=(-f terminal256) # 493| [[ "$file" == - ]] || opt+=("$file") ;; Error: SHELLCHECK_WARNING: [#def260] /usr/bin/lesspipe.sh:491:28: warning[SC3030]: In POSIX sh, arrays are undefined. # 489| [[ $file == - && -z $lang ]] && opt=(-g) # 490| [[ -n $LESSCOLORIZER && $LESSCOLORIZER = *-[OP]\ *style=* ]] && style="${LESSCOLORIZER/*style=/}" # 491|-> [[ -n $style ]] && opt+=(-O style="${style%% *}") # 492| [[ $colors -ge 256 ]] && opt+=(-f terminal256) # 493| [[ "$file" == - ]] || opt+=("$file") ;; Error: SHELLCHECK_WARNING: [#def261] /usr/bin/lesspipe.sh:492:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 490| [[ -n $LESSCOLORIZER && $LESSCOLORIZER = *-[OP]\ *style=* ]] && style="${LESSCOLORIZER/*style=/}" # 491| [[ -n $style ]] && opt+=(-O style="${style%% *}") # 492|-> [[ $colors -ge 256 ]] && opt+=(-f terminal256) # 493| [[ "$file" == - ]] || opt+=("$file") ;; # 494| source-highlight) Error: SHELLCHECK_WARNING: [#def262] /usr/bin/lesspipe.sh:492:29: warning[SC3024]: In POSIX sh, += is undefined. # 490| [[ -n $LESSCOLORIZER && $LESSCOLORIZER = *-[OP]\ *style=* ]] && style="${LESSCOLORIZER/*style=/}" # 491| [[ -n $style ]] && opt+=(-O style="${style%% *}") # 492|-> [[ $colors -ge 256 ]] && opt+=(-f terminal256) # 493| [[ "$file" == - ]] || opt+=("$file") ;; # 494| source-highlight) Error: SHELLCHECK_WARNING: [#def263] /usr/bin/lesspipe.sh:492:34: warning[SC3030]: In POSIX sh, arrays are undefined. # 490| [[ -n $LESSCOLORIZER && $LESSCOLORIZER = *-[OP]\ *style=* ]] && style="${LESSCOLORIZER/*style=/}" # 491| [[ -n $style ]] && opt+=(-O style="${style%% *}") # 492|-> [[ $colors -ge 256 ]] && opt+=(-f terminal256) # 493| [[ "$file" == - ]] || opt+=("$file") ;; # 494| source-highlight) Error: SHELLCHECK_WARNING: [#def264] /usr/bin/lesspipe.sh:493:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 491| [[ -n $style ]] && opt+=(-O style="${style%% *}") # 492| [[ $colors -ge 256 ]] && opt+=(-f terminal256) # 493|-> [[ "$file" == - ]] || opt+=("$file") ;; # 494| source-highlight) # 495| [[ -n $lang ]] && opt=(-s "${lang##*.}") Error: SHELLCHECK_WARNING: [#def265] /usr/bin/lesspipe.sh:493:15: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 491| [[ -n $style ]] && opt+=(-O style="${style%% *}") # 492| [[ $colors -ge 256 ]] && opt+=(-f terminal256) # 493|-> [[ "$file" == - ]] || opt+=("$file") ;; # 494| source-highlight) # 495| [[ -n $lang ]] && opt=(-s "${lang##*.}") Error: SHELLCHECK_WARNING: [#def266] /usr/bin/lesspipe.sh:493:26: warning[SC3024]: In POSIX sh, += is undefined. # 491| [[ -n $style ]] && opt+=(-O style="${style%% *}") # 492| [[ $colors -ge 256 ]] && opt+=(-f terminal256) # 493|-> [[ "$file" == - ]] || opt+=("$file") ;; # 494| source-highlight) # 495| [[ -n $lang ]] && opt=(-s "${lang##*.}") Error: SHELLCHECK_WARNING: [#def267] /usr/bin/lesspipe.sh:493:31: warning[SC3030]: In POSIX sh, arrays are undefined. # 491| [[ -n $style ]] && opt+=(-O style="${style%% *}") # 492| [[ $colors -ge 256 ]] && opt+=(-f terminal256) # 493|-> [[ "$file" == - ]] || opt+=("$file") ;; # 494| source-highlight) # 495| [[ -n $lang ]] && opt=(-s "${lang##*.}") Error: SHELLCHECK_WARNING: [#def268] /usr/bin/lesspipe.sh:495:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 493| [[ "$file" == - ]] || opt+=("$file") ;; # 494| source-highlight) # 495|-> [[ -n $lang ]] && opt=(-s "${lang##*.}") # 496| style=esc # 497| [[ $colors -ge 256 ]] && style=esc256 Error: SHELLCHECK_WARNING: [#def269] /usr/bin/lesspipe.sh:495:26: warning[SC3030]: In POSIX sh, arrays are undefined. # 493| [[ "$file" == - ]] || opt+=("$file") ;; # 494| source-highlight) # 495|-> [[ -n $lang ]] && opt=(-s "${lang##*.}") # 496| style=esc # 497| [[ $colors -ge 256 ]] && style=esc256 Error: SHELLCHECK_WARNING: [#def270] /usr/bin/lesspipe.sh:497:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 495| [[ -n $lang ]] && opt=(-s "${lang##*.}") # 496| style=esc # 497|-> [[ $colors -ge 256 ]] && style=esc256 # 498| opt+=(--failsafe -f "$style" --style-file "$style".style) # 499| [[ "$file" == - ]] || opt+=(-i "$file") ;; Error: SHELLCHECK_WARNING: [#def271] /usr/bin/lesspipe.sh:498:4: warning[SC3024]: In POSIX sh, += is undefined. # 496| style=esc # 497| [[ $colors -ge 256 ]] && style=esc256 # 498|-> opt+=(--failsafe -f "$style" --style-file "$style".style) # 499| [[ "$file" == - ]] || opt+=(-i "$file") ;; # 500| code2color|vimcolor) Error: SHELLCHECK_WARNING: [#def272] /usr/bin/lesspipe.sh:498:9: warning[SC3030]: In POSIX sh, arrays are undefined. # 496| style=esc # 497| [[ $colors -ge 256 ]] && style=esc256 # 498|-> opt+=(--failsafe -f "$style" --style-file "$style".style) # 499| [[ "$file" == - ]] || opt+=(-i "$file") ;; # 500| code2color|vimcolor) Error: SHELLCHECK_WARNING: [#def273] /usr/bin/lesspipe.sh:499:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 497| [[ $colors -ge 256 ]] && style=esc256 # 498| opt+=(--failsafe -f "$style" --style-file "$style".style) # 499|-> [[ "$file" == - ]] || opt+=(-i "$file") ;; # 500| code2color|vimcolor) # 501| [[ -n $lang ]] && opt=(-l "$lang") Error: SHELLCHECK_WARNING: [#def274] /usr/bin/lesspipe.sh:499:15: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 497| [[ $colors -ge 256 ]] && style=esc256 # 498| opt+=(--failsafe -f "$style" --style-file "$style".style) # 499|-> [[ "$file" == - ]] || opt+=(-i "$file") ;; # 500| code2color|vimcolor) # 501| [[ -n $lang ]] && opt=(-l "$lang") Error: SHELLCHECK_WARNING: [#def275] /usr/bin/lesspipe.sh:499:26: warning[SC3024]: In POSIX sh, += is undefined. # 497| [[ $colors -ge 256 ]] && style=esc256 # 498| opt+=(--failsafe -f "$style" --style-file "$style".style) # 499|-> [[ "$file" == - ]] || opt+=(-i "$file") ;; # 500| code2color|vimcolor) # 501| [[ -n $lang ]] && opt=(-l "$lang") Error: SHELLCHECK_WARNING: [#def276] /usr/bin/lesspipe.sh:499:31: warning[SC3030]: In POSIX sh, arrays are undefined. # 497| [[ $colors -ge 256 ]] && style=esc256 # 498| opt+=(--failsafe -f "$style" --style-file "$style".style) # 499|-> [[ "$file" == - ]] || opt+=(-i "$file") ;; # 500| code2color|vimcolor) # 501| [[ -n $lang ]] && opt=(-l "$lang") Error: SHELLCHECK_WARNING: [#def277] /usr/bin/lesspipe.sh:501:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 499| [[ "$file" == - ]] || opt+=(-i "$file") ;; # 500| code2color|vimcolor) # 501|-> [[ -n $lang ]] && opt=(-l "$lang") # 502| opt+=("$file") ;; # 503| nvimpager) Error: SHELLCHECK_WARNING: [#def278] /usr/bin/lesspipe.sh:501:26: warning[SC3030]: In POSIX sh, arrays are undefined. # 499| [[ "$file" == - ]] || opt+=(-i "$file") ;; # 500| code2color|vimcolor) # 501|-> [[ -n $lang ]] && opt=(-l "$lang") # 502| opt+=("$file") ;; # 503| nvimpager) Error: SHELLCHECK_WARNING: [#def279] /usr/bin/lesspipe.sh:502:4: warning[SC3024]: In POSIX sh, += is undefined. # 500| code2color|vimcolor) # 501| [[ -n $lang ]] && opt=(-l "$lang") # 502|-> opt+=("$file") ;; # 503| nvimpager) # 504| opt=(-c --) Error: SHELLCHECK_WARNING: [#def280] /usr/bin/lesspipe.sh:502:9: warning[SC3030]: In POSIX sh, arrays are undefined. # 500| code2color|vimcolor) # 501| [[ -n $lang ]] && opt=(-l "$lang") # 502|-> opt+=("$file") ;; # 503| nvimpager) # 504| opt=(-c --) Error: SHELLCHECK_WARNING: [#def281] /usr/bin/lesspipe.sh:504:8: warning[SC3030]: In POSIX sh, arrays are undefined. # 502| opt+=("$file") ;; # 503| nvimpager) # 504|-> opt=(-c --) # 505| [[ -n $lang ]] && opt+=(-c "set filetype=$lang") # 506| opt+=("$file") ;; Error: SHELLCHECK_WARNING: [#def282] /usr/bin/lesspipe.sh:505:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 503| nvimpager) # 504| opt=(-c --) # 505|-> [[ -n $lang ]] && opt+=(-c "set filetype=$lang") # 506| opt+=("$file") ;; # 507| e2ansi-cat) Error: SHELLCHECK_WARNING: [#def283] /usr/bin/lesspipe.sh:505:22: warning[SC3024]: In POSIX sh, += is undefined. # 503| nvimpager) # 504| opt=(-c --) # 505|-> [[ -n $lang ]] && opt+=(-c "set filetype=$lang") # 506| opt+=("$file") ;; # 507| e2ansi-cat) Error: SHELLCHECK_WARNING: [#def284] /usr/bin/lesspipe.sh:505:27: warning[SC3030]: In POSIX sh, arrays are undefined. # 503| nvimpager) # 504| opt=(-c --) # 505|-> [[ -n $lang ]] && opt+=(-c "set filetype=$lang") # 506| opt+=("$file") ;; # 507| e2ansi-cat) Error: SHELLCHECK_WARNING: [#def285] /usr/bin/lesspipe.sh:506:4: warning[SC3024]: In POSIX sh, += is undefined. # 504| opt=(-c --) # 505| [[ -n $lang ]] && opt+=(-c "set filetype=$lang") # 506|-> opt+=("$file") ;; # 507| e2ansi-cat) # 508| opt=(-- "$file") Error: SHELLCHECK_WARNING: [#def286] /usr/bin/lesspipe.sh:506:9: warning[SC3030]: In POSIX sh, arrays are undefined. # 504| opt=(-c --) # 505| [[ -n $lang ]] && opt+=(-c "set filetype=$lang") # 506|-> opt+=("$file") ;; # 507| e2ansi-cat) # 508| opt=(-- "$file") Error: SHELLCHECK_WARNING: [#def287] /usr/bin/lesspipe.sh:508:8: warning[SC3030]: In POSIX sh, arrays are undefined. # 506| opt+=("$file") ;; # 507| e2ansi-cat) # 508|-> opt=(-- "$file") # 509| [[ -n $lang ]] && opt=(-- --mode "$lang" "$file") ;; # 510| bat|batcat) Error: SHELLCHECK_WARNING: [#def288] /usr/bin/lesspipe.sh:509:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 507| e2ansi-cat) # 508| opt=(-- "$file") # 509|-> [[ -n $lang ]] && opt=(-- --mode "$lang" "$file") ;; # 510| bat|batcat) # 511| [[ -n $lang ]] && opt=(-l "$lang") Error: SHELLCHECK_WARNING: [#def289] /usr/bin/lesspipe.sh:509:26: warning[SC3030]: In POSIX sh, arrays are undefined. # 507| e2ansi-cat) # 508| opt=(-- "$file") # 509|-> [[ -n $lang ]] && opt=(-- --mode "$lang" "$file") ;; # 510| bat|batcat) # 511| [[ -n $lang ]] && opt=(-l "$lang") Error: SHELLCHECK_WARNING: [#def290] /usr/bin/lesspipe.sh:511:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 509| [[ -n $lang ]] && opt=(-- --mode "$lang" "$file") ;; # 510| bat|batcat) # 511|-> [[ -n $lang ]] && opt=(-l "$lang") # 512| batconfig=$($prog --config-file 2>/dev/null) # 513| # Extract style and theme from LESSCOLORIZER Error: SHELLCHECK_WARNING: [#def291] /usr/bin/lesspipe.sh:511:26: warning[SC3030]: In POSIX sh, arrays are undefined. # 509| [[ -n $lang ]] && opt=(-- --mode "$lang" "$file") ;; # 510| bat|batcat) # 511|-> [[ -n $lang ]] && opt=(-l "$lang") # 512| batconfig=$($prog --config-file 2>/dev/null) # 513| # Extract style and theme from LESSCOLORIZER Error: SHELLCHECK_WARNING: [#def292] /usr/bin/lesspipe.sh:515:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 513| # Extract style and theme from LESSCOLORIZER # 514| opt2=${LESSCOLORIZER##*--} # 515|-> [[ $opt2 == style=* ]] && style=${opt2##*=} # 516| [[ $opt2 == theme=* ]] && theme=${opt2##*=} # 517| opt2=$(echo "$LESSCOLORIZER" | tr -s ' ') Error: SHELLCHECK_WARNING: [#def293] /usr/bin/lesspipe.sh:515:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 513| # Extract style and theme from LESSCOLORIZER # 514| opt2=${LESSCOLORIZER##*--} # 515|-> [[ $opt2 == style=* ]] && style=${opt2##*=} # 516| [[ $opt2 == theme=* ]] && theme=${opt2##*=} # 517| opt2=$(echo "$LESSCOLORIZER" | tr -s ' ') Error: SHELLCHECK_WARNING: [#def294] /usr/bin/lesspipe.sh:516:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 514| opt2=${LESSCOLORIZER##*--} # 515| [[ $opt2 == style=* ]] && style=${opt2##*=} # 516|-> [[ $opt2 == theme=* ]] && theme=${opt2##*=} # 517| opt2=$(echo "$LESSCOLORIZER" | tr -s ' ') # 518| opt2=${opt2%[ ]--*} Error: SHELLCHECK_WARNING: [#def295] /usr/bin/lesspipe.sh:516:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 514| opt2=${LESSCOLORIZER##*--} # 515| [[ $opt2 == style=* ]] && style=${opt2##*=} # 516|-> [[ $opt2 == theme=* ]] && theme=${opt2##*=} # 517| opt2=$(echo "$LESSCOLORIZER" | tr -s ' ') # 518| opt2=${opt2%[ ]--*} Error: SHELLCHECK_WARNING: [#def296] /usr/bin/lesspipe.sh:520:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 518| opt2=${opt2%[ ]--*} # 519| opt2=${opt2##*--} # 520|-> [[ $opt2 == style=* ]] && style=${opt2##*=} # 521| [[ $opt2 == theme=* ]] && theme=${opt2##*=} # 522| # Sanitize theme (apostroph or backslash in theme names with spaces) Error: SHELLCHECK_WARNING: [#def297] /usr/bin/lesspipe.sh:520:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 518| opt2=${opt2%[ ]--*} # 519| opt2=${opt2##*--} # 520|-> [[ $opt2 == style=* ]] && style=${opt2##*=} # 521| [[ $opt2 == theme=* ]] && theme=${opt2##*=} # 522| # Sanitize theme (apostroph or backslash in theme names with spaces) Error: SHELLCHECK_WARNING: [#def298] /usr/bin/lesspipe.sh:521:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 519| opt2=${opt2##*--} # 520| [[ $opt2 == style=* ]] && style=${opt2##*=} # 521|-> [[ $opt2 == theme=* ]] && theme=${opt2##*=} # 522| # Sanitize theme (apostroph or backslash in theme names with spaces) # 523| [[ -n $theme ]] && theme=$(echo "${theme##*=}" | tr -d '/"\047\134/') Error: SHELLCHECK_WARNING: [#def299] /usr/bin/lesspipe.sh:521:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 519| opt2=${opt2##*--} # 520| [[ $opt2 == style=* ]] && style=${opt2##*=} # 521|-> [[ $opt2 == theme=* ]] && theme=${opt2##*=} # 522| # Sanitize theme (apostroph or backslash in theme names with spaces) # 523| [[ -n $theme ]] && theme=$(echo "${theme##*=}" | tr -d '/"\047\134/') Error: SHELLCHECK_WARNING: [#def300] /usr/bin/lesspipe.sh:523:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 521| [[ $opt2 == theme=* ]] && theme=${opt2##*=} # 522| # Sanitize theme (apostroph or backslash in theme names with spaces) # 523|-> [[ -n $theme ]] && theme=$(echo "${theme##*=}" | tr -d '/"\047\134/') # 524| # Apply defaults from config or environment # 525| [[ -z $style ]] && style=$BAT_STYLE Error: SHELLCHECK_WARNING: [#def301] /usr/bin/lesspipe.sh:525:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 523| [[ -n $theme ]] && theme=$(echo "${theme##*=}" | tr -d '/"\047\134/') # 524| # Apply defaults from config or environment # 525|-> [[ -z $style ]] && style=$BAT_STYLE # 526| [[ -z $theme ]] && theme=$BAT_THEME # 527| if [[ -r "$batconfig" ]]; then Error: SHELLCHECK_WARNING: [#def302] /usr/bin/lesspipe.sh:526:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 524| # Apply defaults from config or environment # 525| [[ -z $style ]] && style=$BAT_STYLE # 526|-> [[ -z $theme ]] && theme=$BAT_THEME # 527| if [[ -r "$batconfig" ]]; then # 528| [[ -z $style ]] && grep -q -e '^--style' "$batconfig" || style=plain Error: SHELLCHECK_WARNING: [#def303] /usr/bin/lesspipe.sh:527:7: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 525| [[ -z $style ]] && style=$BAT_STYLE # 526| [[ -z $theme ]] && theme=$BAT_THEME # 527|-> if [[ -r "$batconfig" ]]; then # 528| [[ -z $style ]] && grep -q -e '^--style' "$batconfig" || style=plain # 529| [[ -z $theme ]] && grep -q -e '^--theme' "$batconfig" || theme=ansi Error: SHELLCHECK_WARNING: [#def304] /usr/bin/lesspipe.sh:528:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 526| [[ -z $theme ]] && theme=$BAT_THEME # 527| if [[ -r "$batconfig" ]]; then # 528|-> [[ -z $style ]] && grep -q -e '^--style' "$batconfig" || style=plain # 529| [[ -z $theme ]] && grep -q -e '^--theme' "$batconfig" || theme=ansi # 530| else Error: SHELLCHECK_WARNING: [#def305] /usr/bin/lesspipe.sh:529:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 527| if [[ -r "$batconfig" ]]; then # 528| [[ -z $style ]] && grep -q -e '^--style' "$batconfig" || style=plain # 529|-> [[ -z $theme ]] && grep -q -e '^--theme' "$batconfig" || theme=ansi # 530| else # 531| [[ -z $style ]] && style=plain Error: SHELLCHECK_WARNING: [#def306] /usr/bin/lesspipe.sh:531:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 529| [[ -z $theme ]] && grep -q -e '^--theme' "$batconfig" || theme=ansi # 530| else # 531|-> [[ -z $style ]] && style=plain # 532| [[ -z $theme ]] && theme=ansi # 533| fi Error: SHELLCHECK_WARNING: [#def307] /usr/bin/lesspipe.sh:532:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 530| else # 531| [[ -z $style ]] && style=plain # 532|-> [[ -z $theme ]] && theme=ansi # 533| fi # 534| style="${style%% *}" theme="${theme%%[|&;<>]*}" Error: SHELLCHECK_WARNING: [#def308] /usr/bin/lesspipe.sh:535:4: warning[SC3024]: In POSIX sh, += is undefined. # 533| fi # 534| style="${style%% *}" theme="${theme%%[|&;<>]*}" # 535|-> opt+=(${style:+--style="$style"} ${theme:+--theme="$theme"}) # 536| opt+=("$COLOR" --paging=never "$file") ;; # 537| *) Error: SHELLCHECK_WARNING: [#def309] /usr/bin/lesspipe.sh:535:9: warning[SC3030]: In POSIX sh, arrays are undefined. # 533| fi # 534| style="${style%% *}" theme="${theme%%[|&;<>]*}" # 535|-> opt+=(${style:+--style="$style"} ${theme:+--theme="$theme"}) # 536| opt+=("$COLOR" --paging=never "$file") ;; # 537| *) Error: SHELLCHECK_WARNING: [#def310] /usr/bin/lesspipe.sh:536:4: warning[SC3024]: In POSIX sh, += is undefined. # 534| style="${style%% *}" theme="${theme%%[|&;<>]*}" # 535| opt+=(${style:+--style="$style"} ${theme:+--theme="$theme"}) # 536|-> opt+=("$COLOR" --paging=never "$file") ;; # 537| *) # 538| ;; Error: SHELLCHECK_WARNING: [#def311] /usr/bin/lesspipe.sh:536:9: warning[SC3030]: In POSIX sh, arrays are undefined. # 534| style="${style%% *}" theme="${theme%%[|&;<>]*}" # 535| opt+=(${style:+--style="$style"} ${theme:+--theme="$theme"}) # 536|-> opt+=("$COLOR" --paging=never "$file") ;; # 537| *) # 538| ;; Error: SHELLCHECK_WARNING: [#def312] /usr/bin/lesspipe.sh:540:12: warning[SC3030]: In POSIX sh, arrays are undefined. # 538| ;; # 539| esac # 540|-> colorizer=("$prog" "${opt[@]}") # 541| } # 542| Error: SHELLCHECK_WARNING: [#def313] /usr/bin/lesspipe.sh:540:22: warning[SC3054]: In POSIX sh, array references are undefined. # 538| ;; # 539| esac # 540|-> colorizer=("$prog" "${opt[@]}") # 541| } # 542| Error: SHELLCHECK_WARNING: [#def314] /usr/bin/lesspipe.sh:544:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 542| # 543| has_colorizer () { # 544|-> [[ $COLOR == *always ]] || return # 545| [[ $2 == plain || -z $2 ]] && return # 546| prog=$(find_colorizer) Error: SHELLCHECK_WARNING: [#def315] /usr/bin/lesspipe.sh:544:12: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 542| # 543| has_colorizer () { # 544|-> [[ $COLOR == *always ]] || return # 545| [[ $2 == plain || -z $2 ]] && return # 546| prog=$(find_colorizer) Error: SHELLCHECK_WARNING: [#def316] /usr/bin/lesspipe.sh:545:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 543| has_colorizer () { # 544| [[ $COLOR == *always ]] || return # 545|-> [[ $2 == plain || -z $2 ]] && return # 546| prog=$(find_colorizer) # 547| # prefer an explicitly requested language Error: SHELLCHECK_WARNING: [#def317] /usr/bin/lesspipe.sh:545:8: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 543| has_colorizer () { # 544| [[ $COLOR == *always ]] || return # 545|-> [[ $2 == plain || -z $2 ]] && return # 546| prog=$(find_colorizer) # 547| # prefer an explicitly requested language Error: SHELLCHECK_WARNING: [#def318] /usr/bin/lesspipe.sh:548:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 546| prog=$(find_colorizer) # 547| # prefer an explicitly requested language # 548|-> [[ "$2" =~ ^[0-9]*$ || -z "$2" ]] || reql=$2 # 549| # if input is from a pipe use the suffix as language hint # 550| [[ $1 == - ]] && lang=$3 Error: SHELLCHECK_WARNING: [#def319] /usr/bin/lesspipe.sh:548:10: warning[SC3015]: In POSIX sh, =~ regex matching is undefined. # 546| prog=$(find_colorizer) # 547| # prefer an explicitly requested language # 548|-> [[ "$2" =~ ^[0-9]*$ || -z "$2" ]] || reql=$2 # 549| # if input is from a pipe use the suffix as language hint # 550| [[ $1 == - ]] && lang=$3 Error: SHELLCHECK_WARNING: [#def320] /usr/bin/lesspipe.sh:550:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 548| [[ "$2" =~ ^[0-9]*$ || -z "$2" ]] || reql=$2 # 549| # if input is from a pipe use the suffix as language hint # 550|-> [[ $1 == - ]] && lang=$3 # 551| # 552| pname=${prog##*/} Error: SHELLCHECK_WARNING: [#def321] /usr/bin/lesspipe.sh:550:8: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 548| [[ "$2" =~ ^[0-9]*$ || -z "$2" ]] || reql=$2 # 549| # if input is from a pipe use the suffix as language hint # 550|-> [[ $1 == - ]] && lang=$3 # 551| # 552| pname=${prog##*/} Error: SHELLCHECK_WARNING: [#def322] /usr/bin/lesspipe.sh:556:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 554| # 555| lang="$(check_lang "$pname" "$reql")" # 556|-> if [[ -z "$lang" && $1 == - && -n $3 ]]; then # 557| lang=$3 # 558| [[ $lang == *.* ]] && lang=${lang##*.} Error: SHELLCHECK_WARNING: [#def323] /usr/bin/lesspipe.sh:556:25: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 554| # 555| lang="$(check_lang "$pname" "$reql")" # 556|-> if [[ -z "$lang" && $1 == - && -n $3 ]]; then # 557| lang=$3 # 558| [[ $lang == *.* ]] && lang=${lang##*.} Error: SHELLCHECK_WARNING: [#def324] /usr/bin/lesspipe.sh:558:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 556| if [[ -z "$lang" && $1 == - && -n $3 ]]; then # 557| lang=$3 # 558|-> [[ $lang == *.* ]] && lang=${lang##*.} # 559| lang="$(check_lang "$pname" "$lang")" # 560| fi Error: SHELLCHECK_WARNING: [#def325] /usr/bin/lesspipe.sh:558:12: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 556| if [[ -z "$lang" && $1 == - && -n $3 ]]; then # 557| lang=$3 # 558|-> [[ $lang == *.* ]] && lang=${lang##*.} # 559| lang="$(check_lang "$pname" "$lang")" # 560| fi Error: SHELLCHECK_WARNING: [#def326] /usr/bin/lesspipe.sh:566:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 564| # 565| isfinal () { # 566|-> [[ $x == plain && -n $fext ]] && x="$fext" # 567| if [[ "$2" == *$sep ]]; then # 568| if [[ "$2" == "$sep" && "$x" == html ]]; then Error: SHELLCHECK_WARNING: [#def327] /usr/bin/lesspipe.sh:566:8: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 564| # 565| isfinal () { # 566|-> [[ $x == plain && -n $fext ]] && x="$fext" # 567| if [[ "$2" == *$sep ]]; then # 568| if [[ "$2" == "$sep" && "$x" == html ]]; then Error: SHELLCHECK_WARNING: [#def328] /usr/bin/lesspipe.sh:567:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 565| isfinal () { # 566| [[ $x == plain && -n $fext ]] && x="$fext" # 567|-> if [[ "$2" == *$sep ]]; then # 568| if [[ "$2" == "$sep" && "$x" == html ]]; then # 569| [[ $COLOR == *always ]] && colarg="--color" || colarg="--mono" Error: SHELLCHECK_WARNING: [#def329] /usr/bin/lesspipe.sh:567:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 565| isfinal () { # 566| [[ $x == plain && -n $fext ]] && x="$fext" # 567|-> if [[ "$2" == *$sep ]]; then # 568| if [[ "$2" == "$sep" && "$x" == html ]]; then # 569| [[ $COLOR == *always ]] && colarg="--color" || colarg="--mono" Error: SHELLCHECK_WARNING: [#def330] /usr/bin/lesspipe.sh:568:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 566| [[ $x == plain && -n $fext ]] && x="$fext" # 567| if [[ "$2" == *$sep ]]; then # 568|-> if [[ "$2" == "$sep" && "$x" == html ]]; then # 569| [[ $COLOR == *always ]] && colarg="--color" || colarg="--mono" # 570| has_cmd xmq && isxmq "$1" html && return Error: SHELLCHECK_WARNING: [#def331] /usr/bin/lesspipe.sh:568:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 566| [[ $x == plain && -n $fext ]] && x="$fext" # 567| if [[ "$2" == *$sep ]]; then # 568|-> if [[ "$2" == "$sep" && "$x" == html ]]; then # 569| [[ $COLOR == *always ]] && colarg="--color" || colarg="--mono" # 570| has_cmd xmq && isxmq "$1" html && return Error: SHELLCHECK_WARNING: [#def332] /usr/bin/lesspipe.sh:568:32: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 566| [[ $x == plain && -n $fext ]] && x="$fext" # 567| if [[ "$2" == *$sep ]]; then # 568|-> if [[ "$2" == "$sep" && "$x" == html ]]; then # 569| [[ $COLOR == *always ]] && colarg="--color" || colarg="--mono" # 570| has_cmd xmq && isxmq "$1" html && return Error: SHELLCHECK_WARNING: [#def333] /usr/bin/lesspipe.sh:569:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 567| if [[ "$2" == *$sep ]]; then # 568| if [[ "$2" == "$sep" && "$x" == html ]]; then # 569|-> [[ $COLOR == *always ]] && colarg="--color" || colarg="--mono" # 570| has_cmd xmq && isxmq "$1" html && return # 571| fi Error: SHELLCHECK_WARNING: [#def334] /usr/bin/lesspipe.sh:569:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 567| if [[ "$2" == *$sep ]]; then # 568| if [[ "$2" == "$sep" && "$x" == html ]]; then # 569|-> [[ $COLOR == *always ]] && colarg="--color" || colarg="--mono" # 570| has_cmd xmq && isxmq "$1" html && return # 571| fi Error: SHELLCHECK_WARNING: [#def335] /usr/bin/lesspipe.sh:575:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 573| return # 574| fi # 575|-> if [[ -z "${cmd[*]}" ]]; then # 576| # respect extension set by user # 577| [[ -n "$file2" && "$fileext" == "$file2" && "$fileext" != *.* ]] && x="$fileext" Error: SHELLCHECK_WARNING: [#def336] /usr/bin/lesspipe.sh:575:12: warning[SC3054]: In POSIX sh, array references are undefined. # 573| return # 574| fi # 575|-> if [[ -z "${cmd[*]}" ]]; then # 576| # respect extension set by user # 577| [[ -n "$file2" && "$fileext" == "$file2" && "$fileext" != *.* ]] && x="$fileext" Error: SHELLCHECK_WARNING: [#def337] /usr/bin/lesspipe.sh:577:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 575| if [[ -z "${cmd[*]}" ]]; then # 576| # respect extension set by user # 577|-> [[ -n "$file2" && "$fileext" == "$file2" && "$fileext" != *.* ]] && x="$fileext" # 578| case "$x" in # 579| directory) Error: SHELLCHECK_WARNING: [#def338] /usr/bin/lesspipe.sh:577:31: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 575| if [[ -z "${cmd[*]}" ]]; then # 576| # respect extension set by user # 577|-> [[ -n "$file2" && "$fileext" == "$file2" && "$fileext" != *.* ]] && x="$fileext" # 578| case "$x" in # 579| directory) Error: SHELLCHECK_WARNING: [#def339] /usr/bin/lesspipe.sh:580:8: warning[SC3030]: In POSIX sh, arrays are undefined. # 578| case "$x" in # 579| directory) # 580|-> cmd=(ls -lA "$COLOR" "$1") # 581| if ! ls "$COLOR" > /dev/null 2>&1; then # 582| cmd=(CLICOLOR_FORCE=1 ls -lA -G "$1") Error: SHELLCHECK_WARNING: [#def340] /usr/bin/lesspipe.sh:582:9: warning[SC3030]: In POSIX sh, arrays are undefined. # 580| cmd=(ls -lA "$COLOR" "$1") # 581| if ! ls "$COLOR" > /dev/null 2>&1; then # 582|-> cmd=(CLICOLOR_FORCE=1 ls -lA -G "$1") # 583| if ! ls -lA -G > /dev/null 2>&1; then # 584| cmd=(ls -lA "$1") Error: SHELLCHECK_WARNING: [#def341] /usr/bin/lesspipe.sh:584:10: warning[SC3030]: In POSIX sh, arrays are undefined. # 582| cmd=(CLICOLOR_FORCE=1 ls -lA -G "$1") # 583| if ! ls -lA -G > /dev/null 2>&1; then # 584|-> cmd=(ls -lA "$1") # 585| fi # 586| fi Error: SHELLCHECK_WARNING: [#def342] /usr/bin/lesspipe.sh:587:35: warning[SC3054]: In POSIX sh, array references are undefined. # 585| fi # 586| fi # 587|-> msg="$x: showing the output of ${cmd[*]}" ;; # 588| xml) # 589| [[ -z $file2 ]] && Error: SHELLCHECK_WARNING: [#def343] /usr/bin/lesspipe.sh:589:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 587| msg="$x: showing the output of ${cmd[*]}" ;; # 588| xml) # 589|-> [[ -z $file2 ]] && # 590| has_cmd xmq && cmd=(isxmq "$1" xml) ;; # 591| html) Error: SHELLCHECK_WARNING: [#def344] /usr/bin/lesspipe.sh:590:23: warning[SC3030]: In POSIX sh, arrays are undefined. # 588| xml) # 589| [[ -z $file2 ]] && # 590|-> has_cmd xmq && cmd=(isxmq "$1" xml) ;; # 591| html) # 592| [[ -z $file2 ]] && has_htmlprog && cmd=(ishtml "$1") ;; Error: SHELLCHECK_WARNING: [#def345] /usr/bin/lesspipe.sh:592:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 590| has_cmd xmq && cmd=(isxmq "$1" xml) ;; # 591| html) # 592|-> [[ -z $file2 ]] && has_htmlprog && cmd=(ishtml "$1") ;; # 593| dtb|dts) # 594| has_cmd dtc && cmd=(isdtb "$1") ;; Error: SHELLCHECK_WARNING: [#def346] /usr/bin/lesspipe.sh:592:43: warning[SC3030]: In POSIX sh, arrays are undefined. # 590| has_cmd xmq && cmd=(isxmq "$1" xml) ;; # 591| html) # 592|-> [[ -z $file2 ]] && has_htmlprog && cmd=(ishtml "$1") ;; # 593| dtb|dts) # 594| has_cmd dtc && cmd=(isdtb "$1") ;; Error: SHELLCHECK_WARNING: [#def347] /usr/bin/lesspipe.sh:594:23: warning[SC3030]: In POSIX sh, arrays are undefined. # 592| [[ -z $file2 ]] && has_htmlprog && cmd=(ishtml "$1") ;; # 593| dtb|dts) # 594|-> has_cmd dtc && cmd=(isdtb "$1") ;; # 595| pdf) # 596| { has_cmd pdftotext && cmd=(istemp pdftotext -layout -nopgbrk -q -- "$1" -); } || Error: SHELLCHECK_WARNING: [#def348] /usr/bin/lesspipe.sh:596:31: warning[SC3030]: In POSIX sh, arrays are undefined. # 594| has_cmd dtc && cmd=(isdtb "$1") ;; # 595| pdf) # 596|-> { has_cmd pdftotext && cmd=(istemp pdftotext -layout -nopgbrk -q -- "$1" -); } || # 597| { has_cmd pdftohtml && has_htmlprog && cmd=(istemp ispdf "$1"); } || # 598| { has_cmd pdfinfo && cmd=(istemp pdfinfo "$1"); } ;; Error: SHELLCHECK_WARNING: [#def349] /usr/bin/lesspipe.sh:597:47: warning[SC3030]: In POSIX sh, arrays are undefined. # 595| pdf) # 596| { has_cmd pdftotext && cmd=(istemp pdftotext -layout -nopgbrk -q -- "$1" -); } || # 597|-> { has_cmd pdftohtml && has_htmlprog && cmd=(istemp ispdf "$1"); } || # 598| { has_cmd pdfinfo && cmd=(istemp pdfinfo "$1"); } ;; # 599| postscript) Error: SHELLCHECK_WARNING: [#def350] /usr/bin/lesspipe.sh:598:29: warning[SC3030]: In POSIX sh, arrays are undefined. # 596| { has_cmd pdftotext && cmd=(istemp pdftotext -layout -nopgbrk -q -- "$1" -); } || # 597| { has_cmd pdftohtml && has_htmlprog && cmd=(istemp ispdf "$1"); } || # 598|-> { has_cmd pdfinfo && cmd=(istemp pdfinfo "$1"); } ;; # 599| postscript) # 600| has_cmd ps2ascii && nodash ps2ascii "$1" 2>/dev/null ;; Error: SHELLCHECK_WARNING: [#def351] /usr/bin/lesspipe.sh:605:46: warning[SC3030]: In POSIX sh, arrays are undefined. # 603| fileext='java' # 604| t=$(nexttmp 'class') # 605|-> has_cmd procyon && cat "$1" > "$t" && cmd=(JAVA_TOOL_OPTIONS=-DAnsi=true procyon "$t") ;; # 606| docx) # 607| { has_cmd pandoc && cmd=(pandoc -f docx -t plain "$1"); } || Error: SHELLCHECK_WARNING: [#def352] /usr/bin/lesspipe.sh:607:28: warning[SC3030]: In POSIX sh, arrays are undefined. # 605| has_cmd procyon && cat "$1" > "$t" && cmd=(JAVA_TOOL_OPTIONS=-DAnsi=true procyon "$t") ;; # 606| docx) # 607|-> { has_cmd pandoc && cmd=(pandoc -f docx -t plain "$1"); } || # 608| { has_cmd docx2txt && cmd=(docx2txt "$1" -); } || # 609| { has_cmd libreoffice && cmd=(isoffice2 "$1"); } ;; Error: SHELLCHECK_WARNING: [#def353] /usr/bin/lesspipe.sh:608:30: warning[SC3030]: In POSIX sh, arrays are undefined. # 606| docx) # 607| { has_cmd pandoc && cmd=(pandoc -f docx -t plain "$1"); } || # 608|-> { has_cmd docx2txt && cmd=(docx2txt "$1" -); } || # 609| { has_cmd libreoffice && cmd=(isoffice2 "$1"); } ;; # 610| pptx) Error: SHELLCHECK_WARNING: [#def354] /usr/bin/lesspipe.sh:609:33: warning[SC3030]: In POSIX sh, arrays are undefined. # 607| { has_cmd pandoc && cmd=(pandoc -f docx -t plain "$1"); } || # 608| { has_cmd docx2txt && cmd=(docx2txt "$1" -); } || # 609|-> { has_cmd libreoffice && cmd=(isoffice2 "$1"); } ;; # 610| pptx) # 611| { has_cmd pptx2md && has_cmd pandoc && t2=$(nexttmp) && Error: SHELLCHECK_WARNING: [#def355] /usr/bin/lesspipe.sh:613:10: warning[SC3030]: In POSIX sh, arrays are undefined. # 611| { has_cmd pptx2md && has_cmd pandoc && t2=$(nexttmp) && # 612| istemp "pptx2md --disable-image --disable-wmf -o $t2" "$1" && \ # 613|-> cmd=(pandoc -f markdown -t plain "$t2"); } || # 614| { can_do_office && cmd=(isoffice "$1" ppt); } ;; # 615| xlsx|ods) Error: SHELLCHECK_WARNING: [#def356] /usr/bin/lesspipe.sh:614:27: warning[SC3030]: In POSIX sh, arrays are undefined. # 612| istemp "pptx2md --disable-image --disable-wmf -o $t2" "$1" && \ # 613| cmd=(pandoc -f markdown -t plain "$t2"); } || # 614|-> { can_do_office && cmd=(isoffice "$1" ppt); } ;; # 615| xlsx|ods) # 616| { has_cmd xlscat && cmd=(istemp "xlscat -L -R all" "$1"); } || Error: SHELLCHECK_WARNING: [#def357] /usr/bin/lesspipe.sh:616:28: warning[SC3030]: In POSIX sh, arrays are undefined. # 614| { can_do_office && cmd=(isoffice "$1" ppt); } ;; # 615| xlsx|ods) # 616|-> { has_cmd xlscat && cmd=(istemp "xlscat -L -R all" "$1"); } || # 617| { can_do_office && cmd=(isoffice "$1" "$x"); } ;; # 618| odt) Error: SHELLCHECK_WARNING: [#def358] /usr/bin/lesspipe.sh:617:27: warning[SC3030]: In POSIX sh, arrays are undefined. # 615| xlsx|ods) # 616| { has_cmd xlscat && cmd=(istemp "xlscat -L -R all" "$1"); } || # 617|-> { can_do_office && cmd=(isoffice "$1" "$x"); } ;; # 618| odt) # 619| { has_cmd odt2txt && cmd=(istemp odt2txt "$1"); } || Error: SHELLCHECK_WARNING: [#def359] /usr/bin/lesspipe.sh:619:29: warning[SC3030]: In POSIX sh, arrays are undefined. # 617| { can_do_office && cmd=(isoffice "$1" "$x"); } ;; # 618| odt) # 619|-> { has_cmd odt2txt && cmd=(istemp odt2txt "$1"); } || # 620| { has_cmd pandoc && cmd=(pandoc -f odt -t plain "$1"); } || # 621| { has_cmd libreoffice && cmd=(isoffice2 "$1"); } ;; Error: SHELLCHECK_WARNING: [#def360] /usr/bin/lesspipe.sh:620:28: warning[SC3030]: In POSIX sh, arrays are undefined. # 618| odt) # 619| { has_cmd odt2txt && cmd=(istemp odt2txt "$1"); } || # 620|-> { has_cmd pandoc && cmd=(pandoc -f odt -t plain "$1"); } || # 621| { has_cmd libreoffice && cmd=(isoffice2 "$1"); } ;; # 622| odp) Error: SHELLCHECK_WARNING: [#def361] /usr/bin/lesspipe.sh:621:33: warning[SC3030]: In POSIX sh, arrays are undefined. # 619| { has_cmd odt2txt && cmd=(istemp odt2txt "$1"); } || # 620| { has_cmd pandoc && cmd=(pandoc -f odt -t plain "$1"); } || # 621|-> { has_cmd libreoffice && cmd=(isoffice2 "$1"); } ;; # 622| odp) # 623| { can_do_office && cmd=(isoffice "$1" odp); } ;; Error: SHELLCHECK_WARNING: [#def362] /usr/bin/lesspipe.sh:623:27: warning[SC3030]: In POSIX sh, arrays are undefined. # 621| { has_cmd libreoffice && cmd=(isoffice2 "$1"); } ;; # 622| odp) # 623|-> { can_do_office && cmd=(isoffice "$1" odp); } ;; # 624| msword) # 625| t="$1"; [[ "$t" == - ]] && t=/dev/stdin Error: SHELLCHECK_WARNING: [#def363] /usr/bin/lesspipe.sh:625:12: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 623| { can_do_office && cmd=(isoffice "$1" odp); } ;; # 624| msword) # 625|-> t="$1"; [[ "$t" == - ]] && t=/dev/stdin # 626| { has_cmd wvText && cmd=(istemp wvText "$t" /dev/stdout); } || # 627| { has_cmd catdoc && cmd=(catdoc "$1"); } || Error: SHELLCHECK_WARNING: [#def364] /usr/bin/lesspipe.sh:625:20: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 623| { can_do_office && cmd=(isoffice "$1" odp); } ;; # 624| msword) # 625|-> t="$1"; [[ "$t" == - ]] && t=/dev/stdin # 626| { has_cmd wvText && cmd=(istemp wvText "$t" /dev/stdout); } || # 627| { has_cmd catdoc && cmd=(catdoc "$1"); } || Error: SHELLCHECK_WARNING: [#def365] /usr/bin/lesspipe.sh:626:28: warning[SC3030]: In POSIX sh, arrays are undefined. # 624| msword) # 625| t="$1"; [[ "$t" == - ]] && t=/dev/stdin # 626|-> { has_cmd wvText && cmd=(istemp wvText "$t" /dev/stdout); } || # 627| { has_cmd catdoc && cmd=(catdoc "$1"); } || # 628| { has_cmd libreoffice && cmd=(isoffice2 "$1"); } ;; Error: SHELLCHECK_WARNING: [#def366] /usr/bin/lesspipe.sh:627:28: warning[SC3030]: In POSIX sh, arrays are undefined. # 625| t="$1"; [[ "$t" == - ]] && t=/dev/stdin # 626| { has_cmd wvText && cmd=(istemp wvText "$t" /dev/stdout); } || # 627|-> { has_cmd catdoc && cmd=(catdoc "$1"); } || # 628| { has_cmd libreoffice && cmd=(isoffice2 "$1"); } ;; # 629| ms-powerpoint) Error: SHELLCHECK_WARNING: [#def367] /usr/bin/lesspipe.sh:628:33: warning[SC3030]: In POSIX sh, arrays are undefined. # 626| { has_cmd wvText && cmd=(istemp wvText "$t" /dev/stdout); } || # 627| { has_cmd catdoc && cmd=(catdoc "$1"); } || # 628|-> { has_cmd libreoffice && cmd=(isoffice2 "$1"); } ;; # 629| ms-powerpoint) # 630| { can_do_office && cmd=(isoffice "$1" ppt); } ;; Error: SHELLCHECK_WARNING: [#def368] /usr/bin/lesspipe.sh:630:27: warning[SC3030]: In POSIX sh, arrays are undefined. # 628| { has_cmd libreoffice && cmd=(isoffice2 "$1"); } ;; # 629| ms-powerpoint) # 630|-> { can_do_office && cmd=(isoffice "$1" ppt); } ;; # 631| ms-excel) # 632| { can_do_office && cmd=(isoffice "$1" xls); } ;; Error: SHELLCHECK_WARNING: [#def369] /usr/bin/lesspipe.sh:632:27: warning[SC3030]: In POSIX sh, arrays are undefined. # 630| { can_do_office && cmd=(isoffice "$1" ppt); } ;; # 631| ms-excel) # 632|-> { can_do_office && cmd=(isoffice "$1" xls); } ;; # 633| ooffice1) # 634| has_cmd odt2txt && cmd=(istemp odt2txt "$1") ;; Error: SHELLCHECK_WARNING: [#def370] /usr/bin/lesspipe.sh:634:27: warning[SC3030]: In POSIX sh, arrays are undefined. # 632| { can_do_office && cmd=(isoffice "$1" xls); } ;; # 633| ooffice1) # 634|-> has_cmd odt2txt && cmd=(istemp odt2txt "$1") ;; # 635| ipynb|epub) # 636| has_cmd pandoc && cmd=(pandoc -f "$x" -t plain "$1") ;; Error: SHELLCHECK_WARNING: [#def371] /usr/bin/lesspipe.sh:636:26: warning[SC3030]: In POSIX sh, arrays are undefined. # 634| has_cmd odt2txt && cmd=(istemp odt2txt "$1") ;; # 635| ipynb|epub) # 636|-> has_cmd pandoc && cmd=(pandoc -f "$x" -t plain "$1") ;; # 637| troff) # 638| fext=$(fileext "$1") Error: SHELLCHECK_WARNING: [#def372] /usr/bin/lesspipe.sh:640:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 638| fext=$(fileext "$1") # 639| macro=andoc # 640|-> [[ "$fext" == me ]] && macro=e # 641| [[ "$fext" == ms ]] && macro=s # 642| { has_cmd mandoc && cmd=(nodash mandoc "$1"); } || Error: SHELLCHECK_WARNING: [#def373] /usr/bin/lesspipe.sh:640:15: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 638| fext=$(fileext "$1") # 639| macro=andoc # 640|-> [[ "$fext" == me ]] && macro=e # 641| [[ "$fext" == ms ]] && macro=s # 642| { has_cmd mandoc && cmd=(nodash mandoc "$1"); } || Error: SHELLCHECK_WARNING: [#def374] /usr/bin/lesspipe.sh:641:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 639| macro=andoc # 640| [[ "$fext" == me ]] && macro=e # 641|-> [[ "$fext" == ms ]] && macro=s # 642| { has_cmd mandoc && cmd=(nodash mandoc "$1"); } || # 643| { has_cmd man && cmd=(man -l "$1"); } || Error: SHELLCHECK_WARNING: [#def375] /usr/bin/lesspipe.sh:641:15: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 639| macro=andoc # 640| [[ "$fext" == me ]] && macro=e # 641|-> [[ "$fext" == ms ]] && macro=s # 642| { has_cmd mandoc && cmd=(nodash mandoc "$1"); } || # 643| { has_cmd man && cmd=(man -l "$1"); } || Error: SHELLCHECK_WARNING: [#def376] /usr/bin/lesspipe.sh:642:28: warning[SC3030]: In POSIX sh, arrays are undefined. # 640| [[ "$fext" == me ]] && macro=e # 641| [[ "$fext" == ms ]] && macro=s # 642|-> { has_cmd mandoc && cmd=(nodash mandoc "$1"); } || # 643| { has_cmd man && cmd=(man -l "$1"); } || # 644| { [[ $COLOR == *always ]] && has_cmd groff && cmd=(groff -s -p -t -e -Tutf8 -m "$macro" "$1"); } ;; Error: SHELLCHECK_WARNING: [#def377] /usr/bin/lesspipe.sh:643:25: warning[SC3030]: In POSIX sh, arrays are undefined. # 641| [[ "$fext" == ms ]] && macro=s # 642| { has_cmd mandoc && cmd=(nodash mandoc "$1"); } || # 643|-> { has_cmd man && cmd=(man -l "$1"); } || # 644| { [[ $COLOR == *always ]] && has_cmd groff && cmd=(groff -s -p -t -e -Tutf8 -m "$macro" "$1"); } ;; # 645| rtf) Error: SHELLCHECK_WARNING: [#def378] /usr/bin/lesspipe.sh:644:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 642| { has_cmd mandoc && cmd=(nodash mandoc "$1"); } || # 643| { has_cmd man && cmd=(man -l "$1"); } || # 644|-> { [[ $COLOR == *always ]] && has_cmd groff && cmd=(groff -s -p -t -e -Tutf8 -m "$macro" "$1"); } ;; # 645| rtf) # 646| { has_cmd unrtf && cmd=(istemp "unrtf --text" "$1"); } || Error: SHELLCHECK_WARNING: [#def379] /usr/bin/lesspipe.sh:644:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 642| { has_cmd mandoc && cmd=(nodash mandoc "$1"); } || # 643| { has_cmd man && cmd=(man -l "$1"); } || # 644|-> { [[ $COLOR == *always ]] && has_cmd groff && cmd=(groff -s -p -t -e -Tutf8 -m "$macro" "$1"); } ;; # 645| rtf) # 646| { has_cmd unrtf && cmd=(istemp "unrtf --text" "$1"); } || Error: SHELLCHECK_WARNING: [#def380] /usr/bin/lesspipe.sh:644:54: warning[SC3030]: In POSIX sh, arrays are undefined. # 642| { has_cmd mandoc && cmd=(nodash mandoc "$1"); } || # 643| { has_cmd man && cmd=(man -l "$1"); } || # 644|-> { [[ $COLOR == *always ]] && has_cmd groff && cmd=(groff -s -p -t -e -Tutf8 -m "$macro" "$1"); } ;; # 645| rtf) # 646| { has_cmd unrtf && cmd=(istemp "unrtf --text" "$1"); } || Error: SHELLCHECK_WARNING: [#def381] /usr/bin/lesspipe.sh:646:27: warning[SC3030]: In POSIX sh, arrays are undefined. # 644| { [[ $COLOR == *always ]] && has_cmd groff && cmd=(groff -s -p -t -e -Tutf8 -m "$macro" "$1"); } ;; # 645| rtf) # 646|-> { has_cmd unrtf && cmd=(istemp "unrtf --text" "$1"); } || # 647| { has_cmd libreoffice && cmd=(isoffice2 "$1"); } ;; # 648| dvi) Error: SHELLCHECK_WARNING: [#def382] /usr/bin/lesspipe.sh:647:33: warning[SC3030]: In POSIX sh, arrays are undefined. # 645| rtf) # 646| { has_cmd unrtf && cmd=(istemp "unrtf --text" "$1"); } || # 647|-> { has_cmd libreoffice && cmd=(isoffice2 "$1"); } ;; # 648| dvi) # 649| has_cmd dvi2tty && cmd=(istemp "dvi2tty -q" "$1") ;; Error: SHELLCHECK_WARNING: [#def383] /usr/bin/lesspipe.sh:649:27: warning[SC3030]: In POSIX sh, arrays are undefined. # 647| { has_cmd libreoffice && cmd=(isoffice2 "$1"); } ;; # 648| dvi) # 649|-> has_cmd dvi2tty && cmd=(istemp "dvi2tty -q" "$1") ;; # 650| sharedlib) # 651| has_cmd nm && cmd=(istemp nm "$1") ;; Error: SHELLCHECK_WARNING: [#def384] /usr/bin/lesspipe.sh:651:22: warning[SC3030]: In POSIX sh, arrays are undefined. # 649| has_cmd dvi2tty && cmd=(istemp "dvi2tty -q" "$1") ;; # 650| sharedlib) # 651|-> has_cmd nm && cmd=(istemp nm "$1") ;; # 652| pod) # 653| [[ -z $file2 ]] && Error: SHELLCHECK_WARNING: [#def385] /usr/bin/lesspipe.sh:653:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 651| has_cmd nm && cmd=(istemp nm "$1") ;; # 652| pod) # 653|-> [[ -z $file2 ]] && # 654| { { has_cmd pod2text && cmd=(pod2text "$1"); } || # 655| { has_cmd perldoc && cmd=(istemp "perldoc -T" "$1"); }; } ;; Error: SHELLCHECK_WARNING: [#def386] /usr/bin/lesspipe.sh:654:32: warning[SC3030]: In POSIX sh, arrays are undefined. # 652| pod) # 653| [[ -z $file2 ]] && # 654|-> { { has_cmd pod2text && cmd=(pod2text "$1"); } || # 655| { has_cmd perldoc && cmd=(istemp "perldoc -T" "$1"); }; } ;; # 656| hdf|hdf5) Error: SHELLCHECK_WARNING: [#def387] /usr/bin/lesspipe.sh:655:29: warning[SC3030]: In POSIX sh, arrays are undefined. # 653| [[ -z $file2 ]] && # 654| { { has_cmd pod2text && cmd=(pod2text "$1"); } || # 655|-> { has_cmd perldoc && cmd=(istemp "perldoc -T" "$1"); }; } ;; # 656| hdf|hdf5) # 657| { has_cmd h5dump && cmd=(istemp h5dump "$1"); } || Error: SHELLCHECK_WARNING: [#def388] /usr/bin/lesspipe.sh:657:28: warning[SC3030]: In POSIX sh, arrays are undefined. # 655| { has_cmd perldoc && cmd=(istemp "perldoc -T" "$1"); }; } ;; # 656| hdf|hdf5) # 657|-> { has_cmd h5dump && cmd=(istemp h5dump "$1"); } || # 658| { has_cmd ncdump && cmd=(istemp ncdump "$1"); } ;; # 659| matlab) Error: SHELLCHECK_WARNING: [#def389] /usr/bin/lesspipe.sh:658:28: warning[SC3030]: In POSIX sh, arrays are undefined. # 656| hdf|hdf5) # 657| { has_cmd h5dump && cmd=(istemp h5dump "$1"); } || # 658|-> { has_cmd ncdump && cmd=(istemp ncdump "$1"); } ;; # 659| matlab) # 660| has_cmd matdump && cmd=(istemp "matdump -d" "$1") ;; Error: SHELLCHECK_WARNING: [#def390] /usr/bin/lesspipe.sh:660:27: warning[SC3030]: In POSIX sh, arrays are undefined. # 658| { has_cmd ncdump && cmd=(istemp ncdump "$1"); } ;; # 659| matlab) # 660|-> has_cmd matdump && cmd=(istemp "matdump -d" "$1") ;; # 661| djvu) # 662| has_cmd djvutxt && cmd=(djvutxt "$1") ;; Error: SHELLCHECK_WARNING: [#def391] /usr/bin/lesspipe.sh:662:27: warning[SC3030]: In POSIX sh, arrays are undefined. # 660| has_cmd matdump && cmd=(istemp "matdump -d" "$1") ;; # 661| djvu) # 662|-> has_cmd djvutxt && cmd=(djvutxt "$1") ;; # 663| x509|crl|pem-file|csr) # 664| [[ "$x" = csr ]] && x509=req || x509="$x" Error: SHELLCHECK_WARNING: [#def392] /usr/bin/lesspipe.sh:664:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 662| has_cmd djvutxt && cmd=(djvutxt "$1") ;; # 663| x509|crl|pem-file|csr) # 664|-> [[ "$x" = csr ]] && x509=req || x509="$x" # 665| has_cmd openssl && cmd=(istemp "openssl $x509 -text -noout -in" "$1") ;; # 666| pgp) Error: SHELLCHECK_WARNING: [#def393] /usr/bin/lesspipe.sh:665:27: warning[SC3030]: In POSIX sh, arrays are undefined. # 663| x509|crl|pem-file|csr) # 664| [[ "$x" = csr ]] && x509=req || x509="$x" # 665|-> has_cmd openssl && cmd=(istemp "openssl $x509 -text -noout -in" "$1") ;; # 666| pgp) # 667| has_cmd gpg && cmd=(gpg --decrypt --quiet --no-tty --batch --yes "$1") ;; Error: SHELLCHECK_WARNING: [#def394] /usr/bin/lesspipe.sh:667:23: warning[SC3030]: In POSIX sh, arrays are undefined. # 665| has_cmd openssl && cmd=(istemp "openssl $x509 -text -noout -in" "$1") ;; # 666| pgp) # 667|-> has_cmd gpg && cmd=(gpg --decrypt --quiet --no-tty --batch --yes "$1") ;; # 668| bplist|plist) # 669| { has_cmd plistutil && cmd=(istemp "plistutil -i" "$1"); } || Error: SHELLCHECK_WARNING: [#def395] /usr/bin/lesspipe.sh:669:31: warning[SC3030]: In POSIX sh, arrays are undefined. # 667| has_cmd gpg && cmd=(gpg --decrypt --quiet --no-tty --batch --yes "$1") ;; # 668| bplist|plist) # 669|-> { has_cmd plistutil && cmd=(istemp "plistutil -i" "$1"); } || # 670| { has_cmd plutil && cmd=(istemp "plutil -p" "$1"); } ;; # 671| mp3) Error: SHELLCHECK_WARNING: [#def396] /usr/bin/lesspipe.sh:670:28: warning[SC3030]: In POSIX sh, arrays are undefined. # 668| bplist|plist) # 669| { has_cmd plistutil && cmd=(istemp "plistutil -i" "$1"); } || # 670|-> { has_cmd plutil && cmd=(istemp "plutil -p" "$1"); } ;; # 671| mp3) # 672| { has_cmd ffprobe && cmd=(ffprobe -hide_banner -- "$1"); } || Error: SHELLCHECK_WARNING: [#def397] /usr/bin/lesspipe.sh:672:29: warning[SC3030]: In POSIX sh, arrays are undefined. # 670| { has_cmd plutil && cmd=(istemp "plutil -p" "$1"); } ;; # 671| mp3) # 672|-> { has_cmd ffprobe && cmd=(ffprobe -hide_banner -- "$1"); } || # 673| { has_cmd eyeD3 && cmd=(istemp "eyeD3" "$1"); } || # 674| { has_cmd id3v2 && cmd=(istemp "id3v2 --list" "$1"); } ;; Error: SHELLCHECK_WARNING: [#def398] /usr/bin/lesspipe.sh:673:27: warning[SC3030]: In POSIX sh, arrays are undefined. # 671| mp3) # 672| { has_cmd ffprobe && cmd=(ffprobe -hide_banner -- "$1"); } || # 673|-> { has_cmd eyeD3 && cmd=(istemp "eyeD3" "$1"); } || # 674| { has_cmd id3v2 && cmd=(istemp "id3v2 --list" "$1"); } ;; # 675| log) Error: SHELLCHECK_WARNING: [#def399] /usr/bin/lesspipe.sh:674:27: warning[SC3030]: In POSIX sh, arrays are undefined. # 672| { has_cmd ffprobe && cmd=(ffprobe -hide_banner -- "$1"); } || # 673| { has_cmd eyeD3 && cmd=(istemp "eyeD3" "$1"); } || # 674|-> { has_cmd id3v2 && cmd=(istemp "id3v2 --list" "$1"); } ;; # 675| log) # 676| [[ $COLOR == *always* ]] && has_cmd tspin && colorizer=(nodash tspin -f "$1") ;; Error: SHELLCHECK_WARNING: [#def400] /usr/bin/lesspipe.sh:676:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 674| { has_cmd id3v2 && cmd=(istemp "id3v2 --list" "$1"); } ;; # 675| log) # 676|-> [[ $COLOR == *always* ]] && has_cmd tspin && colorizer=(nodash tspin -f "$1") ;; # 677| csv) # 678| msg "type -S<ENTER> for better display of very wide tables" Error: SHELLCHECK_WARNING: [#def401] /usr/bin/lesspipe.sh:676:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 674| { has_cmd id3v2 && cmd=(istemp "id3v2 --list" "$1"); } ;; # 675| log) # 676|-> [[ $COLOR == *always* ]] && has_cmd tspin && colorizer=(nodash tspin -f "$1") ;; # 677| csv) # 678| msg "type -S<ENTER> for better display of very wide tables" Error: SHELLCHECK_WARNING: [#def402] /usr/bin/lesspipe.sh:676:59: warning[SC3030]: In POSIX sh, arrays are undefined. # 674| { has_cmd id3v2 && cmd=(istemp "id3v2 --list" "$1"); } ;; # 675| log) # 676|-> [[ $COLOR == *always* ]] && has_cmd tspin && colorizer=(nodash tspin -f "$1") ;; # 677| csv) # 678| msg "type -S<ENTER> for better display of very wide tables" Error: SHELLCHECK_WARNING: [#def403] /usr/bin/lesspipe.sh:679:30: warning[SC3030]: In POSIX sh, arrays are undefined. # 677| csv) # 678| msg "type -S<ENTER> for better display of very wide tables" # 679|-> { has_cmd csvtable && cmd=(csvtable "$1"); } || # 680| { has_cmd csvlook && cmd=(csvlook -S "$1"); } || # 681| { has_cmd column && cmd=(istemp "column -s ,; -t" "$1"); } || Error: SHELLCHECK_WARNING: [#def404] /usr/bin/lesspipe.sh:680:29: warning[SC3030]: In POSIX sh, arrays are undefined. # 678| msg "type -S<ENTER> for better display of very wide tables" # 679| { has_cmd csvtable && cmd=(csvtable "$1"); } || # 680|-> { has_cmd csvlook && cmd=(csvlook -S "$1"); } || # 681| { has_cmd column && cmd=(istemp "column -s ,; -t" "$1"); } || # 682| { has_cmd pandoc && cmd=(pandoc -f csv -t plain "$1"); } ;; Error: SHELLCHECK_WARNING: [#def405] /usr/bin/lesspipe.sh:681:28: warning[SC3030]: In POSIX sh, arrays are undefined. # 679| { has_cmd csvtable && cmd=(csvtable "$1"); } || # 680| { has_cmd csvlook && cmd=(csvlook -S "$1"); } || # 681|-> { has_cmd column && cmd=(istemp "column -s ,; -t" "$1"); } || # 682| { has_cmd pandoc && cmd=(pandoc -f csv -t plain "$1"); } ;; # 683| json) Error: SHELLCHECK_WARNING: [#def406] /usr/bin/lesspipe.sh:682:28: warning[SC3030]: In POSIX sh, arrays are undefined. # 680| { has_cmd csvlook && cmd=(csvlook -S "$1"); } || # 681| { has_cmd column && cmd=(istemp "column -s ,; -t" "$1"); } || # 682|-> { has_cmd pandoc && cmd=(pandoc -f csv -t plain "$1"); } ;; # 683| json) # 684| [[ $COLOR = *always ]] && opt=(-C .) || opt=(.) Error: SHELLCHECK_WARNING: [#def407] /usr/bin/lesspipe.sh:684:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 682| { has_cmd pandoc && cmd=(pandoc -f csv -t plain "$1"); } ;; # 683| json) # 684|-> [[ $COLOR = *always ]] && opt=(-C .) || opt=(.) # 685| has_cmd jq && cmd=(jq "${opt[@]}" "$1") ;; # 686| zlib) Error: SHELLCHECK_WARNING: [#def408] /usr/bin/lesspipe.sh:684:34: warning[SC3030]: In POSIX sh, arrays are undefined. # 682| { has_cmd pandoc && cmd=(pandoc -f csv -t plain "$1"); } ;; # 683| json) # 684|-> [[ $COLOR = *always ]] && opt=(-C .) || opt=(.) # 685| has_cmd jq && cmd=(jq "${opt[@]}" "$1") ;; # 686| zlib) Error: SHELLCHECK_WARNING: [#def409] /usr/bin/lesspipe.sh:684:48: warning[SC3030]: In POSIX sh, arrays are undefined. # 682| { has_cmd pandoc && cmd=(pandoc -f csv -t plain "$1"); } ;; # 683| json) # 684|-> [[ $COLOR = *always ]] && opt=(-C .) || opt=(.) # 685| has_cmd jq && cmd=(jq "${opt[@]}" "$1") ;; # 686| zlib) Error: SHELLCHECK_WARNING: [#def410] /usr/bin/lesspipe.sh:685:22: warning[SC3030]: In POSIX sh, arrays are undefined. # 683| json) # 684| [[ $COLOR = *always ]] && opt=(-C .) || opt=(.) # 685|-> has_cmd jq && cmd=(jq "${opt[@]}" "$1") ;; # 686| zlib) # 687| [[ $1 == - ]] && arg='/dev/stdin' || arg="$1" Error: SHELLCHECK_WARNING: [#def411] /usr/bin/lesspipe.sh:685:27: warning[SC3054]: In POSIX sh, array references are undefined. # 683| json) # 684| [[ $COLOR = *always ]] && opt=(-C .) || opt=(.) # 685|-> has_cmd jq && cmd=(jq "${opt[@]}" "$1") ;; # 686| zlib) # 687| [[ $1 == - ]] && arg='/dev/stdin' || arg="$1" Error: SHELLCHECK_WARNING: [#def412] /usr/bin/lesspipe.sh:687:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 685| has_cmd jq && cmd=(jq "${opt[@]}" "$1") ;; # 686| zlib) # 687|-> [[ $1 == - ]] && arg='/dev/stdin' || arg="$1" # 688| { has_cmd pigz && pigz -d -z < "$arg" && return ; } || # 689| { has_cmd zlib-flate && zlib-flate -uncompress < "$arg" && return ; } ;; Error: SHELLCHECK_WARNING: [#def413] /usr/bin/lesspipe.sh:687:10: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 685| has_cmd jq && cmd=(jq "${opt[@]}" "$1") ;; # 686| zlib) # 687|-> [[ $1 == - ]] && arg='/dev/stdin' || arg="$1" # 688| { has_cmd pigz && pigz -d -z < "$arg" && return ; } || # 689| { has_cmd zlib-flate && zlib-flate -uncompress < "$arg" && return ; } ;; Error: SHELLCHECK_WARNING: [#def414] /usr/bin/lesspipe.sh:694:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 692| # not a specific file format # 693| fext=$(fileext "$1") # 694|-> if [[ -z ${cmd[*]} && "$fchar" == binary ]]; then # 695| if [[ $fcat == audio || $fcat == video || $fcat == image ]]; then # 696| { has_cmd ffprobe && [[ $fcat != image ]] && cmd=(ffprobe -hide_banner -- "$1"); } || Error: SHELLCHECK_WARNING: [#def415] /usr/bin/lesspipe.sh:694:11: warning[SC3054]: In POSIX sh, array references are undefined. # 692| # not a specific file format # 693| fext=$(fileext "$1") # 694|-> if [[ -z ${cmd[*]} && "$fchar" == binary ]]; then # 695| if [[ $fcat == audio || $fcat == video || $fcat == image ]]; then # 696| { has_cmd ffprobe && [[ $fcat != image ]] && cmd=(ffprobe -hide_banner -- "$1"); } || Error: SHELLCHECK_WARNING: [#def416] /usr/bin/lesspipe.sh:694:33: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 692| # not a specific file format # 693| fext=$(fileext "$1") # 694|-> if [[ -z ${cmd[*]} && "$fchar" == binary ]]; then # 695| if [[ $fcat == audio || $fcat == video || $fcat == image ]]; then # 696| { has_cmd ffprobe && [[ $fcat != image ]] && cmd=(ffprobe -hide_banner -- "$1"); } || Error: SHELLCHECK_WARNING: [#def417] /usr/bin/lesspipe.sh:695:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 693| fext=$(fileext "$1") # 694| if [[ -z ${cmd[*]} && "$fchar" == binary ]]; then # 695|-> if [[ $fcat == audio || $fcat == video || $fcat == image ]]; then # 696| { has_cmd ffprobe && [[ $fcat != image ]] && cmd=(ffprobe -hide_banner -- "$1"); } || # 697| { [[ "$1" != '-' ]] && has_cmd mediainfo && cmd=(mediainfo --Full "$1"); } || Error: SHELLCHECK_WARNING: [#def418] /usr/bin/lesspipe.sh:695:15: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 693| fext=$(fileext "$1") # 694| if [[ -z ${cmd[*]} && "$fchar" == binary ]]; then # 695|-> if [[ $fcat == audio || $fcat == video || $fcat == image ]]; then # 696| { has_cmd ffprobe && [[ $fcat != image ]] && cmd=(ffprobe -hide_banner -- "$1"); } || # 697| { [[ "$1" != '-' ]] && has_cmd mediainfo && cmd=(mediainfo --Full "$1"); } || Error: SHELLCHECK_WARNING: [#def419] /usr/bin/lesspipe.sh:695:33: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 693| fext=$(fileext "$1") # 694| if [[ -z ${cmd[*]} && "$fchar" == binary ]]; then # 695|-> if [[ $fcat == audio || $fcat == video || $fcat == image ]]; then # 696| { has_cmd ffprobe && [[ $fcat != image ]] && cmd=(ffprobe -hide_banner -- "$1"); } || # 697| { [[ "$1" != '-' ]] && has_cmd mediainfo && cmd=(mediainfo --Full "$1"); } || Error: SHELLCHECK_WARNING: [#def420] /usr/bin/lesspipe.sh:695:51: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 693| fext=$(fileext "$1") # 694| if [[ -z ${cmd[*]} && "$fchar" == binary ]]; then # 695|-> if [[ $fcat == audio || $fcat == video || $fcat == image ]]; then # 696| { has_cmd ffprobe && [[ $fcat != image ]] && cmd=(ffprobe -hide_banner -- "$1"); } || # 697| { [[ "$1" != '-' ]] && has_cmd mediainfo && cmd=(mediainfo --Full "$1"); } || Error: SHELLCHECK_WARNING: [#def421] /usr/bin/lesspipe.sh:696:25: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 694| if [[ -z ${cmd[*]} && "$fchar" == binary ]]; then # 695| if [[ $fcat == audio || $fcat == video || $fcat == image ]]; then # 696|-> { has_cmd ffprobe && [[ $fcat != image ]] && cmd=(ffprobe -hide_banner -- "$1"); } || # 697| { [[ "$1" != '-' ]] && has_cmd mediainfo && cmd=(mediainfo --Full "$1"); } || # 698| { has_cmd exiftool && cmd=(exiftool "$1"); } || Error: SHELLCHECK_WARNING: [#def422] /usr/bin/lesspipe.sh:696:53: warning[SC3030]: In POSIX sh, arrays are undefined. # 694| if [[ -z ${cmd[*]} && "$fchar" == binary ]]; then # 695| if [[ $fcat == audio || $fcat == video || $fcat == image ]]; then # 696|-> { has_cmd ffprobe && [[ $fcat != image ]] && cmd=(ffprobe -hide_banner -- "$1"); } || # 697| { [[ "$1" != '-' ]] && has_cmd mediainfo && cmd=(mediainfo --Full "$1"); } || # 698| { has_cmd exiftool && cmd=(exiftool "$1"); } || Error: SHELLCHECK_WARNING: [#def423] /usr/bin/lesspipe.sh:697:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 695| if [[ $fcat == audio || $fcat == video || $fcat == image ]]; then # 696| { has_cmd ffprobe && [[ $fcat != image ]] && cmd=(ffprobe -hide_banner -- "$1"); } || # 697|-> { [[ "$1" != '-' ]] && has_cmd mediainfo && cmd=(mediainfo --Full "$1"); } || # 698| { has_cmd exiftool && cmd=(exiftool "$1"); } || # 699| { has_cmd identify && [[ $fcat == image ]] && cmd=(identify -verbose "$1"); } Error: SHELLCHECK_WARNING: [#def424] /usr/bin/lesspipe.sh:697:52: warning[SC3030]: In POSIX sh, arrays are undefined. # 695| if [[ $fcat == audio || $fcat == video || $fcat == image ]]; then # 696| { has_cmd ffprobe && [[ $fcat != image ]] && cmd=(ffprobe -hide_banner -- "$1"); } || # 697|-> { [[ "$1" != '-' ]] && has_cmd mediainfo && cmd=(mediainfo --Full "$1"); } || # 698| { has_cmd exiftool && cmd=(exiftool "$1"); } || # 699| { has_cmd identify && [[ $fcat == image ]] && cmd=(identify -verbose "$1"); } Error: SHELLCHECK_WARNING: [#def425] /usr/bin/lesspipe.sh:698:30: warning[SC3030]: In POSIX sh, arrays are undefined. # 696| { has_cmd ffprobe && [[ $fcat != image ]] && cmd=(ffprobe -hide_banner -- "$1"); } || # 697| { [[ "$1" != '-' ]] && has_cmd mediainfo && cmd=(mediainfo --Full "$1"); } || # 698|-> { has_cmd exiftool && cmd=(exiftool "$1"); } || # 699| { has_cmd identify && [[ $fcat == image ]] && cmd=(identify -verbose "$1"); } # 700| else Error: SHELLCHECK_WARNING: [#def426] /usr/bin/lesspipe.sh:699:26: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 697| { [[ "$1" != '-' ]] && has_cmd mediainfo && cmd=(mediainfo --Full "$1"); } || # 698| { has_cmd exiftool && cmd=(exiftool "$1"); } || # 699|-> { has_cmd identify && [[ $fcat == image ]] && cmd=(identify -verbose "$1"); } # 700| else # 701| cmd=(nodash strings "$1") Error: SHELLCHECK_WARNING: [#def427] /usr/bin/lesspipe.sh:699:35: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 697| { [[ "$1" != '-' ]] && has_cmd mediainfo && cmd=(mediainfo --Full "$1"); } || # 698| { has_cmd exiftool && cmd=(exiftool "$1"); } || # 699|-> { has_cmd identify && [[ $fcat == image ]] && cmd=(identify -verbose "$1"); } # 700| else # 701| cmd=(nodash strings "$1") Error: SHELLCHECK_WARNING: [#def428] /usr/bin/lesspipe.sh:699:54: warning[SC3030]: In POSIX sh, arrays are undefined. # 697| { [[ "$1" != '-' ]] && has_cmd mediainfo && cmd=(mediainfo --Full "$1"); } || # 698| { has_cmd exiftool && cmd=(exiftool "$1"); } || # 699|-> { has_cmd identify && [[ $fcat == image ]] && cmd=(identify -verbose "$1"); } # 700| else # 701| cmd=(nodash strings "$1") Error: SHELLCHECK_WARNING: [#def429] /usr/bin/lesspipe.sh:701:8: warning[SC3030]: In POSIX sh, arrays are undefined. # 699| { has_cmd identify && [[ $fcat == image ]] && cmd=(identify -verbose "$1"); } # 700| else # 701|-> cmd=(nodash strings "$1") # 702| fi # 703| fi Error: SHELLCHECK_WARNING: [#def430] /usr/bin/lesspipe.sh:704:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 702| fi # 703| fi # 704|-> if [[ -n ${cmd[*]} && "${cmd[*]}" != "cat" ]]; then # 705| [[ -z $msg ]] && msg="append $sep to filename to view the original $x file" # 706| msg "$msg" Error: SHELLCHECK_WARNING: [#def431] /usr/bin/lesspipe.sh:704:11: warning[SC3054]: In POSIX sh, array references are undefined. # 702| fi # 703| fi # 704|-> if [[ -n ${cmd[*]} && "${cmd[*]}" != "cat" ]]; then # 705| [[ -z $msg ]] && msg="append $sep to filename to view the original $x file" # 706| msg "$msg" Error: SHELLCHECK_WARNING: [#def432] /usr/bin/lesspipe.sh:704:25: warning[SC3054]: In POSIX sh, array references are undefined. # 702| fi # 703| fi # 704|-> if [[ -n ${cmd[*]} && "${cmd[*]}" != "cat" ]]; then # 705| [[ -z $msg ]] && msg="append $sep to filename to view the original $x file" # 706| msg "$msg" Error: SHELLCHECK_WARNING: [#def433] /usr/bin/lesspipe.sh:705:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 703| fi # 704| if [[ -n ${cmd[*]} && "${cmd[*]}" != "cat" ]]; then # 705|-> [[ -z $msg ]] && msg="append $sep to filename to view the original $x file" # 706| msg "$msg" # 707| fi Error: SHELLCHECK_WARNING: [#def434] /usr/bin/lesspipe.sh:708:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 706| msg "$msg" # 707| fi # 708|-> [[ -n "$file2" ]] && fext="$file2" # 709| [[ $fcat == text && $x != plain ]] && fext=$x # 710| [[ -z "$fext" ]] && fext=$(fileext "$fileext") Error: SHELLCHECK_WARNING: [#def435] /usr/bin/lesspipe.sh:709:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 707| fi # 708| [[ -n "$file2" ]] && fext="$file2" # 709|-> [[ $fcat == text && $x != plain ]] && fext=$x # 710| [[ -z "$fext" ]] && fext=$(fileext "$fileext") # 711| fext=${fext##*/} Error: SHELLCHECK_WARNING: [#def436] /usr/bin/lesspipe.sh:709:11: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 707| fi # 708| [[ -n "$file2" ]] && fext="$file2" # 709|-> [[ $fcat == text && $x != plain ]] && fext=$x # 710| [[ -z "$fext" ]] && fext=$(fileext "$fileext") # 711| fext=${fext##*/} Error: SHELLCHECK_WARNING: [#def437] /usr/bin/lesspipe.sh:710:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 708| [[ -n "$file2" ]] && fext="$file2" # 709| [[ $fcat == text && $x != plain ]] && fext=$x # 710|-> [[ -z "$fext" ]] && fext=$(fileext "$fileext") # 711| fext=${fext##*/} # 712| [[ -z $fext ]] && fext=$x Error: SHELLCHECK_WARNING: [#def438] /usr/bin/lesspipe.sh:712:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 710| [[ -z "$fext" ]] && fext=$(fileext "$fileext") # 711| fext=${fext##*/} # 712|-> [[ -z $fext ]] && fext=$x # 713| if [[ -n ${cmd[*]} ]]; then # 714| # TAU: When cmd starts with environment variable settings, bash will refuse to execute it via : "${cmd[@]}" Error: SHELLCHECK_WARNING: [#def439] /usr/bin/lesspipe.sh:713:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 711| fext=${fext##*/} # 712| [[ -z $fext ]] && fext=$x # 713|-> if [[ -n ${cmd[*]} ]]; then # 714| # TAU: When cmd starts with environment variable settings, bash will refuse to execute it via : "${cmd[@]}" # 715| # The remedy is simple : Just run it through the "env" command in that case. Error: SHELLCHECK_WARNING: [#def440] /usr/bin/lesspipe.sh:713:11: warning[SC3054]: In POSIX sh, array references are undefined. # 711| fext=${fext##*/} # 712| [[ -z $fext ]] && fext=$x # 713|-> if [[ -n ${cmd[*]} ]]; then # 714| # TAU: When cmd starts with environment variable settings, bash will refuse to execute it via : "${cmd[@]}" # 715| # The remedy is simple : Just run it through the "env" command in that case. Error: SHELLCHECK_WARNING: [#def441] /usr/bin/lesspipe.sh:716:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 714| # TAU: When cmd starts with environment variable settings, bash will refuse to execute it via : "${cmd[@]}" # 715| # The remedy is simple : Just run it through the "env" command in that case. # 716|-> [[ "$cmd" =~ '=' ]] && cmd=(env "${cmd[@]}") # 717| "${cmd[@]}" 2>&1 # 718| else Error: SHELLCHECK_WARNING: [#def442] /usr/bin/lesspipe.sh:716:13: warning[SC3015]: In POSIX sh, =~ regex matching is undefined. # 714| # TAU: When cmd starts with environment variable settings, bash will refuse to execute it via : "${cmd[@]}" # 715| # The remedy is simple : Just run it through the "env" command in that case. # 716|-> [[ "$cmd" =~ '=' ]] && cmd=(env "${cmd[@]}") # 717| "${cmd[@]}" 2>&1 # 718| else Error: SHELLCHECK_WARNING: [#def443] /usr/bin/lesspipe.sh:716:30: warning[SC3030]: In POSIX sh, arrays are undefined. # 714| # TAU: When cmd starts with environment variable settings, bash will refuse to execute it via : "${cmd[@]}" # 715| # The remedy is simple : Just run it through the "env" command in that case. # 716|-> [[ "$cmd" =~ '=' ]] && cmd=(env "${cmd[@]}") # 717| "${cmd[@]}" 2>&1 # 718| else Error: SHELLCHECK_WARNING: [#def444] /usr/bin/lesspipe.sh:716:36: warning[SC3054]: In POSIX sh, array references are undefined. # 714| # TAU: When cmd starts with environment variable settings, bash will refuse to execute it via : "${cmd[@]}" # 715| # The remedy is simple : Just run it through the "env" command in that case. # 716|-> [[ "$cmd" =~ '=' ]] && cmd=(env "${cmd[@]}") # 717| "${cmd[@]}" 2>&1 # 718| else Error: SHELLCHECK_WARNING: [#def445] /usr/bin/lesspipe.sh:717:4: warning[SC3054]: In POSIX sh, array references are undefined. # 715| # The remedy is simple : Just run it through the "env" command in that case. # 716| [[ "$cmd" =~ '=' ]] && cmd=(env "${cmd[@]}") # 717|-> "${cmd[@]}" 2>&1 # 718| else # 719| local final_input="$1" Error: SHELLCHECK_WARNING: [#def446] /usr/bin/lesspipe.sh:719:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 717| "${cmd[@]}" 2>&1 # 718| else # 719|-> local final_input="$1" # 720| # shellcheck disable=SC2128 # 721| if [[ -n $fileext && "$1" == - && $colorizer != archive_color ]]; then Error: SHELLCHECK_WARNING: [#def447] /usr/bin/lesspipe.sh:721:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 719| local final_input="$1" # 720| # shellcheck disable=SC2128 # 721|-> if [[ -n $fileext && "$1" == - && $colorizer != archive_color ]]; then # 722| final_input=$(nexttmp) # 723| cat "$1" > "$final_input" Error: SHELLCHECK_WARNING: [#def448] /usr/bin/lesspipe.sh:721:29: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 719| local final_input="$1" # 720| # shellcheck disable=SC2128 # 721|-> if [[ -n $fileext && "$1" == - && $colorizer != archive_color ]]; then # 722| final_input=$(nexttmp) # 723| cat "$1" > "$final_input" Error: SHELLCHECK_WARNING: [#def449] /usr/bin/lesspipe.sh:726:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 724| fi # 725| # 726|-> [[ -z ${colorizer[*]} ]] && has_colorizer "$final_input" "$fext" "$fileext" # 727| [[ -n ${colorizer[*]} && $fcat != binary ]] && "${colorizer[@]}" 2>/dev/null && return # 728| # if fileext set, we need to filter to get rid of .fileext Error: SHELLCHECK_WARNING: [#def450] /usr/bin/lesspipe.sh:726:9: warning[SC3054]: In POSIX sh, array references are undefined. # 724| fi # 725| # 726|-> [[ -z ${colorizer[*]} ]] && has_colorizer "$final_input" "$fext" "$fileext" # 727| [[ -n ${colorizer[*]} && $fcat != binary ]] && "${colorizer[@]}" 2>/dev/null && return # 728| # if fileext set, we need to filter to get rid of .fileext Error: SHELLCHECK_WARNING: [#def451] /usr/bin/lesspipe.sh:727:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 725| # 726| [[ -z ${colorizer[*]} ]] && has_colorizer "$final_input" "$fext" "$fileext" # 727|-> [[ -n ${colorizer[*]} && $fcat != binary ]] && "${colorizer[@]}" 2>/dev/null && return # 728| # if fileext set, we need to filter to get rid of .fileext # 729| [[ -n $fileext && "$1" != - ]] && cat "$1" && return Error: SHELLCHECK_WARNING: [#def452] /usr/bin/lesspipe.sh:727:9: warning[SC3054]: In POSIX sh, array references are undefined. # 725| # 726| [[ -z ${colorizer[*]} ]] && has_colorizer "$final_input" "$fext" "$fileext" # 727|-> [[ -n ${colorizer[*]} && $fcat != binary ]] && "${colorizer[@]}" 2>/dev/null && return # 728| # if fileext set, we need to filter to get rid of .fileext # 729| [[ -n $fileext && "$1" != - ]] && cat "$1" && return Error: SHELLCHECK_WARNING: [#def453] /usr/bin/lesspipe.sh:727:51: warning[SC3054]: In POSIX sh, array references are undefined. # 725| # 726| [[ -z ${colorizer[*]} ]] && has_colorizer "$final_input" "$fext" "$fileext" # 727|-> [[ -n ${colorizer[*]} && $fcat != binary ]] && "${colorizer[@]}" 2>/dev/null && return # 728| # if fileext set, we need to filter to get rid of .fileext # 729| [[ -n $fileext && "$1" != - ]] && cat "$1" && return Error: SHELLCHECK_WARNING: [#def454] /usr/bin/lesspipe.sh:729:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 727| [[ -n ${colorizer[*]} && $fcat != binary ]] && "${colorizer[@]}" 2>/dev/null && return # 728| # if fileext set, we need to filter to get rid of .fileext # 729|-> [[ -n $fileext && "$1" != - ]] && cat "$1" && return # 730| cat "$final_input" # 731| fi Error: SHELLCHECK_WARNING: [#def455] /usr/bin/lesspipe.sh:736:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 734| isarchive () { # 735| prog=$1 # 736|-> [[ "$2" =~ ^[a-z_-]*:.* ]] && echo "$2: remote operation tar host:file not allowed" && return # 737| if [[ -n $3 ]]; then # 738| case $prog in Error: SHELLCHECK_WARNING: [#def456] /usr/bin/lesspipe.sh:736:10: warning[SC3015]: In POSIX sh, =~ regex matching is undefined. # 734| isarchive () { # 735| prog=$1 # 736|-> [[ "$2" =~ ^[a-z_-]*:.* ]] && echo "$2: remote operation tar host:file not allowed" && return # 737| if [[ -n $3 ]]; then # 738| case $prog in Error: SHELLCHECK_WARNING: [#def457] /usr/bin/lesspipe.sh:737:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 735| prog=$1 # 736| [[ "$2" =~ ^[a-z_-]*:.* ]] && echo "$2: remote operation tar host:file not allowed" && return # 737|-> if [[ -n $3 ]]; then # 738| case $prog in # 739| tar|bsdtar) Error: SHELLCHECK_WARNING: [#def458] /usr/bin/lesspipe.sh:740:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 738| case $prog in # 739| tar|bsdtar) # 740|-> [[ "$2" =~ ^[a-z_-]*:.* ]] && echo "$2: remote operation tar host:file not allowed" && return # 741| if [[ "$3" =~ .*/$ ]]; then # 742| $prog Otvf "$2" -- "$3" Error: SHELLCHECK_WARNING: [#def459] /usr/bin/lesspipe.sh:740:13: warning[SC3015]: In POSIX sh, =~ regex matching is undefined. # 738| case $prog in # 739| tar|bsdtar) # 740|-> [[ "$2" =~ ^[a-z_-]*:.* ]] && echo "$2: remote operation tar host:file not allowed" && return # 741| if [[ "$3" =~ .*/$ ]]; then # 742| $prog Otvf "$2" -- "$3" Error: SHELLCHECK_WARNING: [#def460] /usr/bin/lesspipe.sh:741:8: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 739| tar|bsdtar) # 740| [[ "$2" =~ ^[a-z_-]*:.* ]] && echo "$2: remote operation tar host:file not allowed" && return # 741|-> if [[ "$3" =~ .*/$ ]]; then # 742| $prog Otvf "$2" -- "$3" # 743| else Error: SHELLCHECK_WARNING: [#def461] /usr/bin/lesspipe.sh:741:16: warning[SC3015]: In POSIX sh, =~ regex matching is undefined. # 739| tar|bsdtar) # 740| [[ "$2" =~ ^[a-z_-]*:.* ]] && echo "$2: remote operation tar host:file not allowed" && return # 741|-> if [[ "$3" =~ .*/$ ]]; then # 742| $prog Otvf "$2" -- "$3" # 743| else Error: SHELLCHECK_WARNING: [#def462] /usr/bin/lesspipe.sh:758:8: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 756| istemp "isoinfo -i" "$2" "-x$3" ;; # 757| cpio) # 758|-> if [[ $(cpio --version) = *GNU* ]]; then # 759| if [[ "$2" == - ]]; then # 760| cpio -i --quiet --to-stdout "$3" Error: SHELLCHECK_WARNING: [#def463] /usr/bin/lesspipe.sh:759:9: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 757| cpio) # 758| if [[ $(cpio --version) = *GNU* ]]; then # 759|-> if [[ "$2" == - ]]; then # 760| cpio -i --quiet --to-stdout "$3" # 761| else Error: SHELLCHECK_WARNING: [#def464] /usr/bin/lesspipe.sh:759:17: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 757| cpio) # 758| if [[ $(cpio --version) = *GNU* ]]; then # 759|-> if [[ "$2" == - ]]; then # 760| cpio -i --quiet --to-stdout "$3" # 761| else Error: SHELLCHECK_WARNING: [#def465] /usr/bin/lesspipe.sh:773:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 771| case $prog in # 772| tar|bsdtar) # 773|-> [[ "$2" =~ ^[a-z_-]*:.* ]] && echo "$2: remote operation tar host:file not allowed" && return # 774| $prog tvf "$2" ;; # 775| rar|unrar) Error: SHELLCHECK_WARNING: [#def466] /usr/bin/lesspipe.sh:773:13: warning[SC3015]: In POSIX sh, =~ regex matching is undefined. # 771| case $prog in # 772| tar|bsdtar) # 773|-> [[ "$2" =~ ^[a-z_-]*:.* ]] && echo "$2: remote operation tar host:file not allowed" && return # 774| $prog tvf "$2" ;; # 775| rar|unrar) Error: SHELLCHECK_WARNING: [#def467] /usr/bin/lesspipe.sh:795:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 793| esac # 794| fi # 795|-> [[ $? != 0 && -n $3 ]] && msg ":$!: could not retrieve $3 from $2" # 796| } # 797| Error: SHELLCHECK_WARNING: [#def468] /usr/bin/lesspipe.sh:807:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 805| # 806| isimage () { # 807|-> if [[ "$1" == appimage ]]; then # 808| offset="-o $("$2" --appimage-offset)" # 809| fi Error: SHELLCHECK_WARNING: [#def469] /usr/bin/lesspipe.sh:807:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 805| # 806| isimage () { # 807|-> if [[ "$1" == appimage ]]; then # 808| offset="-o $("$2" --appimage-offset)" # 809| fi Error: SHELLCHECK_WARNING: [#def470] /usr/bin/lesspipe.sh:810:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 808| offset="-o $("$2" --appimage-offset)" # 809| fi # 810|-> if [[ -z "$3" ]]; then # 811| [[ "$1" == snap ]] && has_cmd snap && snap info "$2" && separatorline # 812| istemp "unsquashfs -d . -llc $offset" "$2" Error: SHELLCHECK_WARNING: [#def471] /usr/bin/lesspipe.sh:811:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 809| fi # 810| if [[ -z "$3" ]]; then # 811|-> [[ "$1" == snap ]] && has_cmd snap && snap info "$2" && separatorline # 812| istemp "unsquashfs -d . -llc $offset" "$2" # 813| else Error: SHELLCHECK_WARNING: [#def472] /usr/bin/lesspipe.sh:811:11: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 809| fi # 810| if [[ -z "$3" ]]; then # 811|-> [[ "$1" == snap ]] && has_cmd snap && snap info "$2" && separatorline # 812| istemp "unsquashfs -d . -llc $offset" "$2" # 813| else Error: SHELLCHECK_WARNING: [#def473] /usr/bin/lesspipe.sh:819:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 817| # 818| isrpm () { # 819|-> if [[ -z "$2" ]]; then # 820| if has_cmd rpm; then # 821| istemp "rpm -qivp --changelog --nomanifest --" "$1" Error: SHELLCHECK_WARNING: [#def474] /usr/bin/lesspipe.sh:823:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 821| istemp "rpm -qivp --changelog --nomanifest --" "$1" # 822| separatorline # 823|-> [[ $1 == - ]] && set "$t" "$1" # 824| fi # 825| if has_cmd bsdtar; then Error: SHELLCHECK_WARNING: [#def475] /usr/bin/lesspipe.sh:823:10: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 821| istemp "rpm -qivp --changelog --nomanifest --" "$1" # 822| separatorline # 823|-> [[ $1 == - ]] && set "$t" "$1" # 824| fi # 825| if has_cmd bsdtar; then Error: SHELLCHECK_WARNING: [#def476] /usr/bin/lesspipe.sh:838:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 836| # 837| isdeb () { # 838|-> if [[ "$1" = - ]]; then # 839| t=$(nexttmp) # 840| cat > "$t" Error: SHELLCHECK_WARNING: [#def477] /usr/bin/lesspipe.sh:845:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 843| if has_cmd bsdtar; then # 844| data=$(bsdtar tf "$1" "data*") # 845|-> if [[ -z "$2" ]]; then # 846| control=$(bsdtar tf "$1" "control*") # 847| bsdtar xOf "$1" "$control" | bsdtar xOf - ./control Error: SHELLCHECK_WARNING: [#def478] /usr/bin/lesspipe.sh:854:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 852| fi # 853| else # 854|-> if [[ "$1" = *@* ]]; then # 855| t=$(nexttmp) # 856| cat "$1" > "$t" Error: SHELLCHECK_WARNING: [#def479] /usr/bin/lesspipe.sh:862:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 860| ft=$(ar p "$1" "$data" | filetype -) # 861| get_unpack_cmd "$ft" - # 862|-> if [[ -z "$2" ]]; then # 863| control=$(ar t "$1"|grep control) # 864| ar p "$1" "$control" | "${cmd[@]}" | tar xOf - ./control Error: SHELLCHECK_WARNING: [#def480] /usr/bin/lesspipe.sh:864:28: warning[SC3054]: In POSIX sh, array references are undefined. # 862| if [[ -z "$2" ]]; then # 863| control=$(ar t "$1"|grep control) # 864|-> ar p "$1" "$control" | "${cmd[@]}" | tar xOf - ./control # 865| separatorline # 866| ar p "$1" "$data" | "${cmd[@]}" | tar tvf - Error: SHELLCHECK_WARNING: [#def481] /usr/bin/lesspipe.sh:866:25: warning[SC3054]: In POSIX sh, array references are undefined. # 864| ar p "$1" "$control" | "${cmd[@]}" | tar xOf - ./control # 865| separatorline # 866|-> ar p "$1" "$data" | "${cmd[@]}" | tar tvf - # 867| else # 868| ar p "$1" "$data" | "${cmd[@]}" | tar xOf - "$2" Error: SHELLCHECK_WARNING: [#def482] /usr/bin/lesspipe.sh:868:25: warning[SC3054]: In POSIX sh, array references are undefined. # 866| ar p "$1" "$data" | "${cmd[@]}" | tar tvf - # 867| else # 868|-> ar p "$1" "$data" | "${cmd[@]}" | tar xOf - "$2" # 869| fi # 870| fi Error: SHELLCHECK_WARNING: [#def483] /usr/bin/lesspipe.sh:886:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 884| # 885| isxmq () { # 886|-> [[ $COLOR == *always ]] && colarg="--color" || colarg="--mono" # 887| msg "xmq output, append :$2 to the filename to see the (colored) contents" # 888| xmq "$1" render-terminal "$colarg" Error: SHELLCHECK_WARNING: [#def484] /usr/bin/lesspipe.sh:886:12: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 884| # 885| isxmq () { # 886|-> [[ $COLOR == *always ]] && colarg="--color" || colarg="--mono" # 887| msg "xmq output, append :$2 to the filename to see the (colored) contents" # 888| xmq "$1" render-terminal "$colarg" Error: SHELLCHECK_WARNING: [#def485] /usr/bin/lesspipe.sh:894:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 892| errors=$(nexttmp) # 893| has_colorizer "-" "dts" "dts" # 894|-> [[ -z "${colorizer[*]}" ]] && colorizer=(cat) # 895| dtc -I dtb -O dts -o - -- "$1" 2> "$errors" | "${colorizer[@]}" # 896| if [[ -s "$errors" ]]; then Error: SHELLCHECK_WARNING: [#def486] /usr/bin/lesspipe.sh:894:9: warning[SC3054]: In POSIX sh, array references are undefined. # 892| errors=$(nexttmp) # 893| has_colorizer "-" "dts" "dts" # 894|-> [[ -z "${colorizer[*]}" ]] && colorizer=(cat) # 895| dtc -I dtb -O dts -o - -- "$1" 2> "$errors" | "${colorizer[@]}" # 896| if [[ -s "$errors" ]]; then Error: SHELLCHECK_WARNING: [#def487] /usr/bin/lesspipe.sh:894:42: warning[SC3030]: In POSIX sh, arrays are undefined. # 892| errors=$(nexttmp) # 893| has_colorizer "-" "dts" "dts" # 894|-> [[ -z "${colorizer[*]}" ]] && colorizer=(cat) # 895| dtc -I dtb -O dts -o - -- "$1" 2> "$errors" | "${colorizer[@]}" # 896| if [[ -s "$errors" ]]; then Error: SHELLCHECK_WARNING: [#def488] /usr/bin/lesspipe.sh:895:49: warning[SC3054]: In POSIX sh, array references are undefined. # 893| has_colorizer "-" "dts" "dts" # 894| [[ -z "${colorizer[*]}" ]] && colorizer=(cat) # 895|-> dtc -I dtb -O dts -o - -- "$1" 2> "$errors" | "${colorizer[@]}" # 896| if [[ -s "$errors" ]]; then # 897| separatorline "Warnings" Error: SHELLCHECK_WARNING: [#def489] /usr/bin/lesspipe.sh:896:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 894| [[ -z "${colorizer[*]}" ]] && colorizer=(cat) # 895| dtc -I dtb -O dts -o - -- "$1" 2> "$errors" | "${colorizer[@]}" # 896|-> if [[ -s "$errors" ]]; then # 897| separatorline "Warnings" # 898| cat "$errors" Error: SHELLCHECK_WARNING: [#def490] /usr/bin/lesspipe.sh:917:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 915| # 916| handle_w3m () { # 917|-> if [[ "$1" == *\?* ]]; then # 918| t=$(nexttmp) # 919| ln -s "$1" "$t" Error: SHELLCHECK_WARNING: [#def491] /usr/bin/lesspipe.sh:917:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 915| # 916| handle_w3m () { # 917|-> if [[ "$1" == *\?* ]]; then # 918| t=$(nexttmp) # 919| ln -s "$1" "$t" Error: SHELLCHECK_WARNING: [#def492] /usr/bin/lesspipe.sh:926:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 924| # 925| ishtml () { # 926|-> [[ $1 == - ]] && arg1=-stdin || arg1="$1" # 927| htmlopt=--unicode-snob # 928| has_cmd html2text && html2text -utf8 </dev/null 2>/dev/null && htmlopt=-utf8 Error: SHELLCHECK_WARNING: [#def493] /usr/bin/lesspipe.sh:926:8: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 924| # 925| ishtml () { # 926|-> [[ $1 == - ]] && arg1=-stdin || arg1="$1" # 927| htmlopt=--unicode-snob # 928| has_cmd html2text && html2text -utf8 </dev/null 2>/dev/null && htmlopt=-utf8 Error: SHELLCHECK_WARNING: [#def494] /usr/bin/lesspipe.sh:934:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 932| has_cmd lynx && lynx -force_html -dump "$arg1" && return || # 933| # different versions of html2text existing, force unicode # 934|-> [[ "$1" == https://* ]] && return || # 935| has_cmd html2text && nodash html2text "$htmlopt" "$1" # 936| } Error: SHELLCHECK_WARNING: [#def495] /usr/bin/lesspipe.sh:934:10: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 932| has_cmd lynx && lynx -force_html -dump "$arg1" && return || # 933| # different versions of html2text existing, force unicode # 934|-> [[ "$1" == https://* ]] && return || # 935| has_cmd html2text && nodash html2text "$htmlopt" "$1" # 936| } Error: SHELLCHECK_WARNING: [#def496] /usr/bin/lesspipe.sh:940:1: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 938| # the main program # 939| set +o noclobber # 940|-> [[ -n "$ZSH_VERSION" ]] && setopt sh_word_split # 941| # the current locale in lowercase (or generic utf-8) # 942| charmap="utf-8" Error: SHELLCHECK_WARNING: [#def497] /usr/bin/lesspipe.sh:950:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 948| sep=: # file name separator # 949| altsep='=' # alternate separator character # 950|-> if [[ -e "$1" && "$1" == *"$sep"* ]]; then # 951| sep=$altsep # 952| elif [[ "$1" == *"$altsep"* ]]; then Error: SHELLCHECK_WARNING: [#def498] /usr/bin/lesspipe.sh:950:23: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 948| sep=: # file name separator # 949| altsep='=' # alternate separator character # 950|-> if [[ -e "$1" && "$1" == *"$sep"* ]]; then # 951| sep=$altsep # 952| elif [[ "$1" == *"$altsep"* ]]; then Error: SHELLCHECK_WARNING: [#def499] /usr/bin/lesspipe.sh:952:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 950| if [[ -e "$1" && "$1" == *"$sep"* ]]; then # 951| sep=$altsep # 952|-> elif [[ "$1" == *"$altsep"* ]]; then # 953| [[ -e "${1%%"$altsep"*}" ]] && sep=$altsep # 954| fi Error: SHELLCHECK_WARNING: [#def500] /usr/bin/lesspipe.sh:952:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 950| if [[ -e "$1" && "$1" == *"$sep"* ]]; then # 951| sep=$altsep # 952|-> elif [[ "$1" == *"$altsep"* ]]; then # 953| [[ -e "${1%%"$altsep"*}" ]] && sep=$altsep # 954| fi Error: SHELLCHECK_WARNING: [#def501] /usr/bin/lesspipe.sh:953:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 951| sep=$altsep # 952| elif [[ "$1" == *"$altsep"* ]]; then # 953|-> [[ -e "${1%%"$altsep"*}" ]] && sep=$altsep # 954| fi # 955| Error: SHELLCHECK_WARNING: [#def502] /usr/bin/lesspipe.sh:957:33: warning[SC3048]: In POSIX sh, prefixing signal names with 'SIG' is undefined. # 955| # 956| tmpdir=$(mktemp -d --tmpdir "lesspipe.XXXXXX") || exit 1 # 957|-> trap 'rm -rf "$tmpdir"; exit 1' SIGINT # 958| trap 'rm -rf "$tmpdir"' EXIT # 959| trap - PIPE Error: SHELLCHECK_WARNING: [#def503] /usr/bin/lesspipe.sh:963:1: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 961| analyze_args # 962| # make LESSOPEN="|- ... " work # 963|-> [[ $LESSOPEN == *\|\|* ]] && retval=1 || retval=0 # 964| if [[ $LESSOPEN == *\|-* && $1 == - ]]; then # 965| t=$(nexttmp) Error: SHELLCHECK_WARNING: [#def504] /usr/bin/lesspipe.sh:963:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 961| analyze_args # 962| # make LESSOPEN="|- ... " work # 963|-> [[ $LESSOPEN == *\|\|* ]] && retval=1 || retval=0 # 964| if [[ $LESSOPEN == *\|-* && $1 == - ]]; then # 965| t=$(nexttmp) Error: SHELLCHECK_WARNING: [#def505] /usr/bin/lesspipe.sh:964:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 962| # make LESSOPEN="|- ... " work # 963| [[ $LESSOPEN == *\|\|* ]] && retval=1 || retval=0 # 964|-> if [[ $LESSOPEN == *\|-* && $1 == - ]]; then # 965| t=$(nexttmp) # 966| if [[ "$fext" == log && $COLOR == *always* ]] && has_cmd tspin; then Error: SHELLCHECK_WARNING: [#def506] /usr/bin/lesspipe.sh:964:17: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 962| # make LESSOPEN="|- ... " work # 963| [[ $LESSOPEN == *\|\|* ]] && retval=1 || retval=0 # 964|-> if [[ $LESSOPEN == *\|-* && $1 == - ]]; then # 965| t=$(nexttmp) # 966| if [[ "$fext" == log && $COLOR == *always* ]] && has_cmd tspin; then Error: SHELLCHECK_WARNING: [#def507] /usr/bin/lesspipe.sh:964:32: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 962| # make LESSOPEN="|- ... " work # 963| [[ $LESSOPEN == *\|\|* ]] && retval=1 || retval=0 # 964|-> if [[ $LESSOPEN == *\|-* && $1 == - ]]; then # 965| t=$(nexttmp) # 966| if [[ "$fext" == log && $COLOR == *always* ]] && has_cmd tspin; then Error: SHELLCHECK_WARNING: [#def508] /usr/bin/lesspipe.sh:966:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 964| if [[ $LESSOPEN == *\|-* && $1 == - ]]; then # 965| t=$(nexttmp) # 966|-> if [[ "$fext" == log && $COLOR == *always* ]] && has_cmd tspin; then # 967| tspin # 968| else Error: SHELLCHECK_WARNING: [#def509] /usr/bin/lesspipe.sh:966:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 964| if [[ $LESSOPEN == *\|-* && $1 == - ]]; then # 965| t=$(nexttmp) # 966|-> if [[ "$fext" == log && $COLOR == *always* ]] && has_cmd tspin; then # 967| tspin # 968| else Error: SHELLCHECK_WARNING: [#def510] /usr/bin/lesspipe.sh:966:33: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 964| if [[ $LESSOPEN == *\|-* && $1 == - ]]; then # 965| t=$(nexttmp) # 966|-> if [[ "$fext" == log && $COLOR == *always* ]] && has_cmd tspin; then # 967| tspin # 968| else Error: SHELLCHECK_WARNING: [#def511] /usr/bin/lesspipe.sh:974:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 972| fi # 973| # 974|-> if [[ -z "$1" && "$0" == */lesspipe.sh ]]; then # 975| [[ "$0" == /* ]] || pat=$(pwd)/ # 976| if [[ "$SHELL" == *csh ]]; then Error: SHELLCHECK_WARNING: [#def512] /usr/bin/lesspipe.sh:974:23: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 972| fi # 973| # 974|-> if [[ -z "$1" && "$0" == */lesspipe.sh ]]; then # 975| [[ "$0" == /* ]] || pat=$(pwd)/ # 976| if [[ "$SHELL" == *csh ]]; then Error: SHELLCHECK_WARNING: [#def513] /usr/bin/lesspipe.sh:975:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 973| # 974| if [[ -z "$1" && "$0" == */lesspipe.sh ]]; then # 975|-> [[ "$0" == /* ]] || pat=$(pwd)/ # 976| if [[ "$SHELL" == *csh ]]; then # 977| echo "setenv LESSOPEN \"|$pat$0 %s\"" Error: SHELLCHECK_WARNING: [#def514] /usr/bin/lesspipe.sh:975:10: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 973| # 974| if [[ -z "$1" && "$0" == */lesspipe.sh ]]; then # 975|-> [[ "$0" == /* ]] || pat=$(pwd)/ # 976| if [[ "$SHELL" == *csh ]]; then # 977| echo "setenv LESSOPEN \"|$pat$0 %s\"" Error: SHELLCHECK_WARNING: [#def515] /usr/bin/lesspipe.sh:976:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 974| if [[ -z "$1" && "$0" == */lesspipe.sh ]]; then # 975| [[ "$0" == /* ]] || pat=$(pwd)/ # 976|-> if [[ "$SHELL" == *csh ]]; then # 977| echo "setenv LESSOPEN \"|$pat$0 %s\"" # 978| else Error: SHELLCHECK_WARNING: [#def516] /usr/bin/lesspipe.sh:976:17: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 974| if [[ -z "$1" && "$0" == */lesspipe.sh ]]; then # 975| [[ "$0" == /* ]] || pat=$(pwd)/ # 976|-> if [[ "$SHELL" == *csh ]]; then # 977| echo "setenv LESSOPEN \"|$pat$0 %s\"" # 978| else Error: SHELLCHECK_WARNING: [#def517] /usr/bin/lesspipe.sh:983:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 981| fi # 982| else # 983|-> [[ -x "${HOME}/.lessfilter" ]] && "${HOME}/.lessfilter" "$1" && exit "$retval" # 984| if has_cmd lessfilter; then # 985| lessfilter "$1" && exit "$retval" Error: SHELLCHECK_WARNING: [#def518] /usr/bin/lesspipe.sh:987:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 985| lessfilter "$1" && exit "$retval" # 986| fi # 987|-> if [[ -z "$1" ]]; then # 988| LESSQUIET=1 # 989| show - Error: SHELLCHECK_WARNING: [#def519] /usr/libexec/less/lesscomplete:9:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 7| # 8| has_cmd () { # 9|-> [[ -n "$2" && "$2" > $($1 --version 2>/dev/null) ]] && return 1 # 10| cmdpath=$(command -v "$1") # 11| [[ -n $cmdpath && -x $cmdpath ]] && return 0 Error: SHELLCHECK_WARNING: [#def520] /usr/libexec/less/lesscomplete:9:21: warning[SC3012]: In POSIX sh, lexicographical > is undefined. # 7| # 8| has_cmd () { # 9|-> [[ -n "$2" && "$2" > $($1 --version 2>/dev/null) ]] && return 1 # 10| cmdpath=$(command -v "$1") # 11| [[ -n $cmdpath && -x $cmdpath ]] && return 0 Error: SHELLCHECK_WARNING: [#def521] /usr/libexec/less/lesscomplete:11:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 9| [[ -n "$2" && "$2" > $($1 --version 2>/dev/null) ]] && return 1 # 10| cmdpath=$(command -v "$1") # 11|-> [[ -n $cmdpath && -x $cmdpath ]] && return 0 # 12| return 1 # 13| } Error: SHELLCHECK_WARNING: [#def522] /usr/libexec/less/lesscomplete:28:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 26| # do not depend on the file extension, if possible # 27| fname="$1" # 28|-> if [[ "$1" == - || -z $1 ]]; then # 29| t=$(nexttmp) # 30| head -c 1000000 > "$t" Error: SHELLCHECK_WARNING: [#def523] /usr/libexec/less/lesscomplete:28:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 26| # do not depend on the file extension, if possible # 27| fname="$1" # 28|-> if [[ "$1" == - || -z $1 ]]; then # 29| t=$(nexttmp) # 30| head -c 1000000 > "$t" Error: SHELLCHECK_WARNING: [#def524] /usr/libexec/less/lesscomplete:31:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 29| t=$(nexttmp) # 30| head -c 1000000 > "$t" # 31|-> [[ -z $fileext ]] && fname="$t" || fname="$fileext" # 32| set "$t" "$2" # 33| fi Error: SHELLCHECK_WARNING: [#def525] /usr/libexec/less/lesscomplete:37:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 35| ### get file type from mime type # 36| ft=$(file -L -s -b --mime "$1" 2> /dev/null) # 37|-> [[ $ft == *=* ]] && fchar="${ft##*=}" || fchar=utf-8 # 38| fcat="${ft%/*}" # 39| ft="${ft#*/}"; ft="${ft%;*}"; ft="${ft#x-script.}"; ft="${ft#x-}" Error: SHELLCHECK_WARNING: [#def526] /usr/libexec/less/lesscomplete:37:9: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 35| ### get file type from mime type # 36| ft=$(file -L -s -b --mime "$1" 2> /dev/null) # 37|-> [[ $ft == *=* ]] && fchar="${ft##*=}" || fchar=utf-8 # 38| fcat="${ft%/*}" # 39| ft="${ft#*/}"; ft="${ft%;*}"; ft="${ft#x-script.}"; ft="${ft#x-}" Error: SHELLCHECK_WARNING: [#def527] /usr/libexec/less/lesscomplete:42:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 40| ftype="${ft#vnd\.}" # 41| ### get file type from 'file' command for an unspecific result # 42|-> if [[ "$fcat" == application ]]; then # 43| if [[ "$ftype" == octet-stream || "$fcat" == text && $ftype == plain ]]; then # 44| ft=$(file -L -s -b "$1" 2> /dev/null) Error: SHELLCHECK_WARNING: [#def528] /usr/libexec/less/lesscomplete:42:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 40| ftype="${ft#vnd\.}" # 41| ### get file type from 'file' command for an unspecific result # 42|-> if [[ "$fcat" == application ]]; then # 43| if [[ "$ftype" == octet-stream || "$fcat" == text && $ftype == plain ]]; then # 44| ft=$(file -L -s -b "$1" 2> /dev/null) Error: SHELLCHECK_WARNING: [#def529] /usr/libexec/less/lesscomplete:43:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 41| ### get file type from 'file' command for an unspecific result # 42| if [[ "$fcat" == application ]]; then # 43|-> if [[ "$ftype" == octet-stream || "$fcat" == text && $ftype == plain ]]; then # 44| ft=$(file -L -s -b "$1" 2> /dev/null) # 45| if [[ $ft == data ]]; then Error: SHELLCHECK_WARNING: [#def530] /usr/libexec/less/lesscomplete:43:18: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 41| ### get file type from 'file' command for an unspecific result # 42| if [[ "$fcat" == application ]]; then # 43|-> if [[ "$ftype" == octet-stream || "$fcat" == text && $ftype == plain ]]; then # 44| ft=$(file -L -s -b "$1" 2> /dev/null) # 45| if [[ $ft == data ]]; then Error: SHELLCHECK_WARNING: [#def531] /usr/libexec/less/lesscomplete:43:45: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 41| ### get file type from 'file' command for an unspecific result # 42| if [[ "$fcat" == application ]]; then # 43|-> if [[ "$ftype" == octet-stream || "$fcat" == text && $ftype == plain ]]; then # 44| ft=$(file -L -s -b "$1" 2> /dev/null) # 45| if [[ $ft == data ]]; then Error: SHELLCHECK_WARNING: [#def532] /usr/libexec/less/lesscomplete:43:63: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 41| ### get file type from 'file' command for an unspecific result # 42| if [[ "$fcat" == application ]]; then # 43|-> if [[ "$ftype" == octet-stream || "$fcat" == text && $ftype == plain ]]; then # 44| ft=$(file -L -s -b "$1" 2> /dev/null) # 45| if [[ $ft == data ]]; then Error: SHELLCHECK_WARNING: [#def533] /usr/libexec/less/lesscomplete:45:7: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 43| if [[ "$ftype" == octet-stream || "$fcat" == text && $ftype == plain ]]; then # 44| ft=$(file -L -s -b "$1" 2> /dev/null) # 45|-> if [[ $ft == data ]]; then # 46| case "$fext" in # 47| br|bro|tbr) Error: SHELLCHECK_WARNING: [#def534] /usr/libexec/less/lesscomplete:45:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 43| if [[ "$ftype" == octet-stream || "$fcat" == text && $ftype == plain ]]; then # 44| ft=$(file -L -s -b "$1" 2> /dev/null) # 45|-> if [[ $ft == data ]]; then # 46| case "$fext" in # 47| br|bro|tbr) Error: SHELLCHECK_WARNING: [#def535] /usr/libexec/less/lesscomplete:54:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 52| fi # 53| fi # 54|-> if [[ "$fext" == appimage || "$fext" == snap ]]; then # 55| ftype="$fext" # 56| elif [[ "$fext" == AppImage ]]; then Error: SHELLCHECK_WARNING: [#def536] /usr/libexec/less/lesscomplete:54:17: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 52| fi # 53| fi # 54|-> if [[ "$fext" == appimage || "$fext" == snap ]]; then # 55| ftype="$fext" # 56| elif [[ "$fext" == AppImage ]]; then Error: SHELLCHECK_WARNING: [#def537] /usr/libexec/less/lesscomplete:54:40: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 52| fi # 53| fi # 54|-> if [[ "$fext" == appimage || "$fext" == snap ]]; then # 55| ftype="$fext" # 56| elif [[ "$fext" == AppImage ]]; then Error: SHELLCHECK_WARNING: [#def538] /usr/libexec/less/lesscomplete:56:8: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 54| if [[ "$fext" == appimage || "$fext" == snap ]]; then # 55| ftype="$fext" # 56|-> elif [[ "$fext" == AppImage ]]; then # 57| ftype=appimage # 58| fi Error: SHELLCHECK_WARNING: [#def539] /usr/libexec/less/lesscomplete:56:19: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 54| if [[ "$fext" == appimage || "$fext" == snap ]]; then # 55| ftype="$fext" # 56|-> elif [[ "$fext" == AppImage ]]; then # 57| ftype=appimage # 58| fi Error: SHELLCHECK_WARNING: [#def540] /usr/libexec/less/lesscomplete:72:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 70| prog="$1" # 71| shift # 72|-> if [[ "$1" == - ]]; then # 73| shift # 74| t=$(nexttmp) Error: SHELLCHECK_WARNING: [#def541] /usr/libexec/less/lesscomplete:72:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 70| prog="$1" # 71| shift # 72|-> if [[ "$1" == - ]]; then # 73| shift # 74| t=$(nexttmp) Error: SHELLCHECK_WARNING: [#def542] /usr/libexec/less/lesscomplete:85:8: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 83| file1="${1%%"$sep"*}" # 84| rest1="${1#"$file1"}" # 85|-> while [[ "$rest1" == "$sep$sep"* ]]; do # 86| [[ "$rest1" == "$sep$sep" ]] && break # 87| rest1="${rest1#"$sep$sep"}" Error: SHELLCHECK_WARNING: [#def543] /usr/libexec/less/lesscomplete:85:20: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 83| file1="${1%%"$sep"*}" # 84| rest1="${1#"$file1"}" # 85|-> while [[ "$rest1" == "$sep$sep"* ]]; do # 86| [[ "$rest1" == "$sep$sep" ]] && break # 87| rest1="${rest1#"$sep$sep"}" Error: SHELLCHECK_WARNING: [#def544] /usr/libexec/less/lesscomplete:86:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 84| rest1="${1#"$file1"}" # 85| while [[ "$rest1" == "$sep$sep"* ]]; do # 86|-> [[ "$rest1" == "$sep$sep" ]] && break # 87| rest1="${rest1#"$sep$sep"}" # 88| file1="${rest1%%"$sep"*}" Error: SHELLCHECK_WARNING: [#def545] /usr/libexec/less/lesscomplete:86:15: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 84| rest1="${1#"$file1"}" # 85| while [[ "$rest1" == "$sep$sep"* ]]; do # 86|-> [[ "$rest1" == "$sep$sep" ]] && break # 87| rest1="${rest1#"$sep$sep"}" # 88| file1="${rest1%%"$sep"*}" Error: SHELLCHECK_WARNING: [#def546] /usr/libexec/less/lesscomplete:92:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 90| file1="${1%"$rest1"}" # 91| done # 92|-> [[ ! -e "$file1" && "$file1" != '-' ]] && exit 1 # 93| rest11="${rest1#"$sep"}" # 94| file2="${rest11%%"$sep"*}" Error: SHELLCHECK_WARNING: [#def547] /usr/libexec/less/lesscomplete:96:8: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 94| file2="${rest11%%"$sep"*}" # 95| rest2="${rest11#"$file2"}" # 96|-> while [[ "$rest2" == "$sep$sep"* ]]; do # 97| [[ "$rest2" == "$sep$sep" ]] && break # 98| rest2="${rest2#"$sep$sep"}" Error: SHELLCHECK_WARNING: [#def548] /usr/libexec/less/lesscomplete:96:20: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 94| file2="${rest11%%"$sep"*}" # 95| rest2="${rest11#"$file2"}" # 96|-> while [[ "$rest2" == "$sep$sep"* ]]; do # 97| [[ "$rest2" == "$sep$sep" ]] && break # 98| rest2="${rest2#"$sep$sep"}" Error: SHELLCHECK_WARNING: [#def549] /usr/libexec/less/lesscomplete:97:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 95| rest2="${rest11#"$file2"}" # 96| while [[ "$rest2" == "$sep$sep"* ]]; do # 97|-> [[ "$rest2" == "$sep$sep" ]] && break # 98| rest2="${rest2#"$sep$sep"}" # 99| file2="${rest2%%"$sep"*}" Error: SHELLCHECK_WARNING: [#def550] /usr/libexec/less/lesscomplete:97:15: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 95| rest2="${rest11#"$file2"}" # 96| while [[ "$rest2" == "$sep$sep"* ]]; do # 97|-> [[ "$rest2" == "$sep$sep" ]] && break # 98| rest2="${rest2#"$sep$sep"}" # 99| file2="${rest2%%"$sep"*}" Error: SHELLCHECK_WARNING: [#def551] /usr/libexec/less/lesscomplete:106:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 104| rest11="$rest1" # 105| # 106|-> if [[ "${cmd[*]}" == "" ]]; then # 107| ft=$(filetype "$file1") # 108| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def552] /usr/libexec/less/lesscomplete:106:9: warning[SC3054]: In POSIX sh, array references are undefined. # 104| rest11="$rest1" # 105| # 106|-> if [[ "${cmd[*]}" == "" ]]; then # 107| ft=$(filetype "$file1") # 108| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def553] /usr/libexec/less/lesscomplete:106:20: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 104| rest11="$rest1" # 105| # 106|-> if [[ "${cmd[*]}" == "" ]]; then # 107| ft=$(filetype "$file1") # 108| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def554] /usr/libexec/less/lesscomplete:109:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 107| ft=$(filetype "$file1") # 108| get_unpack_cmd "$ft" "$file1" "$rest1" # 109|-> if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then # 110| show "-$rest1" # 111| else Error: SHELLCHECK_WARNING: [#def555] /usr/libexec/less/lesscomplete:109:10: warning[SC3054]: In POSIX sh, array references are undefined. # 107| ft=$(filetype "$file1") # 108| get_unpack_cmd "$ft" "$file1" "$rest1" # 109|-> if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then # 110| show "-$rest1" # 111| else Error: SHELLCHECK_WARNING: [#def556] /usr/libexec/less/lesscomplete:116:7: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 114| isfinal "$ft" "$file1" "$rest11" # 115| fi # 116|-> elif [[ "$c1" == "" ]]; then # 117| c1=("${cmd[@]}") # 118| ft=$("${c1[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def557] /usr/libexec/less/lesscomplete:116:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 114| isfinal "$ft" "$file1" "$rest11" # 115| fi # 116|-> elif [[ "$c1" == "" ]]; then # 117| c1=("${cmd[@]}") # 118| ft=$("${c1[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def558] /usr/libexec/less/lesscomplete:117:6: warning[SC3030]: In POSIX sh, arrays are undefined. # 115| fi # 116| elif [[ "$c1" == "" ]]; then # 117|-> c1=("${cmd[@]}") # 118| ft=$("${c1[@]}" | filetype -) || exit 1 # 119| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def559] /usr/libexec/less/lesscomplete:117:8: warning[SC3054]: In POSIX sh, array references are undefined. # 115| fi # 116| elif [[ "$c1" == "" ]]; then # 117|-> c1=("${cmd[@]}") # 118| ft=$("${c1[@]}" | filetype -) || exit 1 # 119| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def560] /usr/libexec/less/lesscomplete:118:9: warning[SC3054]: In POSIX sh, array references are undefined. # 116| elif [[ "$c1" == "" ]]; then # 117| c1=("${cmd[@]}") # 118|-> ft=$("${c1[@]}" | filetype -) || exit 1 # 119| get_unpack_cmd "$ft" "$file1" "$rest1" # 120| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def561] /usr/libexec/less/lesscomplete:120:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 118| ft=$("${c1[@]}" | filetype -) || exit 1 # 119| get_unpack_cmd "$ft" "$file1" "$rest1" # 120|-> if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then # 121| show "-$rest1" # 122| else Error: SHELLCHECK_WARNING: [#def562] /usr/libexec/less/lesscomplete:120:10: warning[SC3054]: In POSIX sh, array references are undefined. # 118| ft=$("${c1[@]}" | filetype -) || exit 1 # 119| get_unpack_cmd "$ft" "$file1" "$rest1" # 120|-> if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then # 121| show "-$rest1" # 122| else Error: SHELLCHECK_WARNING: [#def563] /usr/libexec/less/lesscomplete:123:5: warning[SC3054]: In POSIX sh, array references are undefined. # 121| show "-$rest1" # 122| else # 123|-> "${c1[@]}" | isfinal "$ft" - "$rest11" # 124| fi # 125| elif [[ "$c2" == "" ]]; then Error: SHELLCHECK_WARNING: [#def564] /usr/libexec/less/lesscomplete:125:7: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 123| "${c1[@]}" | isfinal "$ft" - "$rest11" # 124| fi # 125|-> elif [[ "$c2" == "" ]]; then # 126| c2=("${cmd[@]}") # 127| ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def565] /usr/libexec/less/lesscomplete:125:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 123| "${c1[@]}" | isfinal "$ft" - "$rest11" # 124| fi # 125|-> elif [[ "$c2" == "" ]]; then # 126| c2=("${cmd[@]}") # 127| ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def566] /usr/libexec/less/lesscomplete:126:6: warning[SC3030]: In POSIX sh, arrays are undefined. # 124| fi # 125| elif [[ "$c2" == "" ]]; then # 126|-> c2=("${cmd[@]}") # 127| ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 # 128| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def567] /usr/libexec/less/lesscomplete:126:8: warning[SC3054]: In POSIX sh, array references are undefined. # 124| fi # 125| elif [[ "$c2" == "" ]]; then # 126|-> c2=("${cmd[@]}") # 127| ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 # 128| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def568] /usr/libexec/less/lesscomplete:127:9: warning[SC3054]: In POSIX sh, array references are undefined. # 125| elif [[ "$c2" == "" ]]; then # 126| c2=("${cmd[@]}") # 127|-> ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 # 128| get_unpack_cmd "$ft" "$file1" "$rest1" # 129| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def569] /usr/libexec/less/lesscomplete:127:22: warning[SC3054]: In POSIX sh, array references are undefined. # 125| elif [[ "$c2" == "" ]]; then # 126| c2=("${cmd[@]}") # 127|-> ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 # 128| get_unpack_cmd "$ft" "$file1" "$rest1" # 129| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def570] /usr/libexec/less/lesscomplete:129:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 127| ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 # 128| get_unpack_cmd "$ft" "$file1" "$rest1" # 129|-> if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then # 130| show "-$rest1" # 131| else Error: SHELLCHECK_WARNING: [#def571] /usr/libexec/less/lesscomplete:129:10: warning[SC3054]: In POSIX sh, array references are undefined. # 127| ft=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1 # 128| get_unpack_cmd "$ft" "$file1" "$rest1" # 129|-> if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then # 130| show "-$rest1" # 131| else Error: SHELLCHECK_WARNING: [#def572] /usr/libexec/less/lesscomplete:132:5: warning[SC3054]: In POSIX sh, array references are undefined. # 130| show "-$rest1" # 131| else # 132|-> "${c1[@]}" | "${c2[@]}" | isfinal "$ft" - "$rest11" # 133| fi # 134| elif [[ "$c3" == "" ]]; then Error: SHELLCHECK_WARNING: [#def573] /usr/libexec/less/lesscomplete:132:18: warning[SC3054]: In POSIX sh, array references are undefined. # 130| show "-$rest1" # 131| else # 132|-> "${c1[@]}" | "${c2[@]}" | isfinal "$ft" - "$rest11" # 133| fi # 134| elif [[ "$c3" == "" ]]; then Error: SHELLCHECK_WARNING: [#def574] /usr/libexec/less/lesscomplete:134:7: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 132| "${c1[@]}" | "${c2[@]}" | isfinal "$ft" - "$rest11" # 133| fi # 134|-> elif [[ "$c3" == "" ]]; then # 135| c3=("${cmd[@]}") # 136| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def575] /usr/libexec/less/lesscomplete:134:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 132| "${c1[@]}" | "${c2[@]}" | isfinal "$ft" - "$rest11" # 133| fi # 134|-> elif [[ "$c3" == "" ]]; then # 135| c3=("${cmd[@]}") # 136| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def576] /usr/libexec/less/lesscomplete:135:6: warning[SC3030]: In POSIX sh, arrays are undefined. # 133| fi # 134| elif [[ "$c3" == "" ]]; then # 135|-> c3=("${cmd[@]}") # 136| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 # 137| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def577] /usr/libexec/less/lesscomplete:135:8: warning[SC3054]: In POSIX sh, array references are undefined. # 133| fi # 134| elif [[ "$c3" == "" ]]; then # 135|-> c3=("${cmd[@]}") # 136| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 # 137| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def578] /usr/libexec/less/lesscomplete:136:9: warning[SC3054]: In POSIX sh, array references are undefined. # 134| elif [[ "$c3" == "" ]]; then # 135| c3=("${cmd[@]}") # 136|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 # 137| get_unpack_cmd "$ft" "$file1" "$rest1" # 138| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def579] /usr/libexec/less/lesscomplete:136:22: warning[SC3054]: In POSIX sh, array references are undefined. # 134| elif [[ "$c3" == "" ]]; then # 135| c3=("${cmd[@]}") # 136|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 # 137| get_unpack_cmd "$ft" "$file1" "$rest1" # 138| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def580] /usr/libexec/less/lesscomplete:136:35: warning[SC3054]: In POSIX sh, array references are undefined. # 134| elif [[ "$c3" == "" ]]; then # 135| c3=("${cmd[@]}") # 136|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 # 137| get_unpack_cmd "$ft" "$file1" "$rest1" # 138| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def581] /usr/libexec/less/lesscomplete:138:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 136| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 # 137| get_unpack_cmd "$ft" "$file1" "$rest1" # 138|-> if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then # 139| show "-$rest1" # 140| else Error: SHELLCHECK_WARNING: [#def582] /usr/libexec/less/lesscomplete:138:10: warning[SC3054]: In POSIX sh, array references are undefined. # 136| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1 # 137| get_unpack_cmd "$ft" "$file1" "$rest1" # 138|-> if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then # 139| show "-$rest1" # 140| else Error: SHELLCHECK_WARNING: [#def583] /usr/libexec/less/lesscomplete:141:5: warning[SC3054]: In POSIX sh, array references are undefined. # 139| show "-$rest1" # 140| else # 141|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | isfinal "$ft" - "$rest11" # 142| fi # 143| elif [[ "$c4" == "" ]]; then Error: SHELLCHECK_WARNING: [#def584] /usr/libexec/less/lesscomplete:141:18: warning[SC3054]: In POSIX sh, array references are undefined. # 139| show "-$rest1" # 140| else # 141|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | isfinal "$ft" - "$rest11" # 142| fi # 143| elif [[ "$c4" == "" ]]; then Error: SHELLCHECK_WARNING: [#def585] /usr/libexec/less/lesscomplete:141:31: warning[SC3054]: In POSIX sh, array references are undefined. # 139| show "-$rest1" # 140| else # 141|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | isfinal "$ft" - "$rest11" # 142| fi # 143| elif [[ "$c4" == "" ]]; then Error: SHELLCHECK_WARNING: [#def586] /usr/libexec/less/lesscomplete:143:7: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 141| "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | isfinal "$ft" - "$rest11" # 142| fi # 143|-> elif [[ "$c4" == "" ]]; then # 144| c4=("${cmd[@]}") # 145| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def587] /usr/libexec/less/lesscomplete:143:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 141| "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | isfinal "$ft" - "$rest11" # 142| fi # 143|-> elif [[ "$c4" == "" ]]; then # 144| c4=("${cmd[@]}") # 145| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def588] /usr/libexec/less/lesscomplete:144:6: warning[SC3030]: In POSIX sh, arrays are undefined. # 142| fi # 143| elif [[ "$c4" == "" ]]; then # 144|-> c4=("${cmd[@]}") # 145| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 146| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def589] /usr/libexec/less/lesscomplete:144:8: warning[SC3054]: In POSIX sh, array references are undefined. # 142| fi # 143| elif [[ "$c4" == "" ]]; then # 144|-> c4=("${cmd[@]}") # 145| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 146| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def590] /usr/libexec/less/lesscomplete:145:9: warning[SC3054]: In POSIX sh, array references are undefined. # 143| elif [[ "$c4" == "" ]]; then # 144| c4=("${cmd[@]}") # 145|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 146| get_unpack_cmd "$ft" "$file1" "$rest1" # 147| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def591] /usr/libexec/less/lesscomplete:145:22: warning[SC3054]: In POSIX sh, array references are undefined. # 143| elif [[ "$c4" == "" ]]; then # 144| c4=("${cmd[@]}") # 145|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 146| get_unpack_cmd "$ft" "$file1" "$rest1" # 147| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def592] /usr/libexec/less/lesscomplete:145:35: warning[SC3054]: In POSIX sh, array references are undefined. # 143| elif [[ "$c4" == "" ]]; then # 144| c4=("${cmd[@]}") # 145|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 146| get_unpack_cmd "$ft" "$file1" "$rest1" # 147| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def593] /usr/libexec/less/lesscomplete:145:48: warning[SC3054]: In POSIX sh, array references are undefined. # 143| elif [[ "$c4" == "" ]]; then # 144| c4=("${cmd[@]}") # 145|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 146| get_unpack_cmd "$ft" "$file1" "$rest1" # 147| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def594] /usr/libexec/less/lesscomplete:147:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 145| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 146| get_unpack_cmd "$ft" "$file1" "$rest1" # 147|-> if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then # 148| show "-$rest1" # 149| else Error: SHELLCHECK_WARNING: [#def595] /usr/libexec/less/lesscomplete:147:10: warning[SC3054]: In POSIX sh, array references are undefined. # 145| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1 # 146| get_unpack_cmd "$ft" "$file1" "$rest1" # 147|-> if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then # 148| show "-$rest1" # 149| else Error: SHELLCHECK_WARNING: [#def596] /usr/libexec/less/lesscomplete:150:5: warning[SC3054]: In POSIX sh, array references are undefined. # 148| show "-$rest1" # 149| else # 150|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | isfinal "$ft" - "$rest11" # 151| fi # 152| elif [[ "$c5" == "" ]]; then Error: SHELLCHECK_WARNING: [#def597] /usr/libexec/less/lesscomplete:150:18: warning[SC3054]: In POSIX sh, array references are undefined. # 148| show "-$rest1" # 149| else # 150|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | isfinal "$ft" - "$rest11" # 151| fi # 152| elif [[ "$c5" == "" ]]; then Error: SHELLCHECK_WARNING: [#def598] /usr/libexec/less/lesscomplete:150:31: warning[SC3054]: In POSIX sh, array references are undefined. # 148| show "-$rest1" # 149| else # 150|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | isfinal "$ft" - "$rest11" # 151| fi # 152| elif [[ "$c5" == "" ]]; then Error: SHELLCHECK_WARNING: [#def599] /usr/libexec/less/lesscomplete:150:44: warning[SC3054]: In POSIX sh, array references are undefined. # 148| show "-$rest1" # 149| else # 150|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | isfinal "$ft" - "$rest11" # 151| fi # 152| elif [[ "$c5" == "" ]]; then Error: SHELLCHECK_WARNING: [#def600] /usr/libexec/less/lesscomplete:152:7: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 150| "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | isfinal "$ft" - "$rest11" # 151| fi # 152|-> elif [[ "$c5" == "" ]]; then # 153| c5=("${cmd[@]}") # 154| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def601] /usr/libexec/less/lesscomplete:152:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 150| "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | isfinal "$ft" - "$rest11" # 151| fi # 152|-> elif [[ "$c5" == "" ]]; then # 153| c5=("${cmd[@]}") # 154| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 Error: SHELLCHECK_WARNING: [#def602] /usr/libexec/less/lesscomplete:153:6: warning[SC3030]: In POSIX sh, arrays are undefined. # 151| fi # 152| elif [[ "$c5" == "" ]]; then # 153|-> c5=("${cmd[@]}") # 154| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 155| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def603] /usr/libexec/less/lesscomplete:153:8: warning[SC3054]: In POSIX sh, array references are undefined. # 151| fi # 152| elif [[ "$c5" == "" ]]; then # 153|-> c5=("${cmd[@]}") # 154| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 155| get_unpack_cmd "$ft" "$file1" "$rest1" Error: SHELLCHECK_WARNING: [#def604] /usr/libexec/less/lesscomplete:154:9: warning[SC3054]: In POSIX sh, array references are undefined. # 152| elif [[ "$c5" == "" ]]; then # 153| c5=("${cmd[@]}") # 154|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 155| get_unpack_cmd "$ft" "$file1" "$rest1" # 156| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def605] /usr/libexec/less/lesscomplete:154:22: warning[SC3054]: In POSIX sh, array references are undefined. # 152| elif [[ "$c5" == "" ]]; then # 153| c5=("${cmd[@]}") # 154|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 155| get_unpack_cmd "$ft" "$file1" "$rest1" # 156| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def606] /usr/libexec/less/lesscomplete:154:35: warning[SC3054]: In POSIX sh, array references are undefined. # 152| elif [[ "$c5" == "" ]]; then # 153| c5=("${cmd[@]}") # 154|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 155| get_unpack_cmd "$ft" "$file1" "$rest1" # 156| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def607] /usr/libexec/less/lesscomplete:154:48: warning[SC3054]: In POSIX sh, array references are undefined. # 152| elif [[ "$c5" == "" ]]; then # 153| c5=("${cmd[@]}") # 154|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 155| get_unpack_cmd "$ft" "$file1" "$rest1" # 156| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def608] /usr/libexec/less/lesscomplete:154:61: warning[SC3054]: In POSIX sh, array references are undefined. # 152| elif [[ "$c5" == "" ]]; then # 153| c5=("${cmd[@]}") # 154|-> ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 155| get_unpack_cmd "$ft" "$file1" "$rest1" # 156| if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then Error: SHELLCHECK_WARNING: [#def609] /usr/libexec/less/lesscomplete:156:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 154| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 155| get_unpack_cmd "$ft" "$file1" "$rest1" # 156|-> if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then # 157| echo "$0: Too many levels of encapsulation" # 158| else Error: SHELLCHECK_WARNING: [#def610] /usr/libexec/less/lesscomplete:156:10: warning[SC3054]: In POSIX sh, array references are undefined. # 154| ft=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1 # 155| get_unpack_cmd "$ft" "$file1" "$rest1" # 156|-> if [[ "${cmd[*]}" != "" && -z $colorizer ]]; then # 157| echo "$0: Too many levels of encapsulation" # 158| else Error: SHELLCHECK_WARNING: [#def611] /usr/libexec/less/lesscomplete:159:5: warning[SC3054]: In POSIX sh, array references are undefined. # 157| echo "$0: Too many levels of encapsulation" # 158| else # 159|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | isfinal "$ft" - "$rest11" # 160| fi # 161| fi Error: SHELLCHECK_WARNING: [#def612] /usr/libexec/less/lesscomplete:159:18: warning[SC3054]: In POSIX sh, array references are undefined. # 157| echo "$0: Too many levels of encapsulation" # 158| else # 159|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | isfinal "$ft" - "$rest11" # 160| fi # 161| fi Error: SHELLCHECK_WARNING: [#def613] /usr/libexec/less/lesscomplete:159:31: warning[SC3054]: In POSIX sh, array references are undefined. # 157| echo "$0: Too many levels of encapsulation" # 158| else # 159|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | isfinal "$ft" - "$rest11" # 160| fi # 161| fi Error: SHELLCHECK_WARNING: [#def614] /usr/libexec/less/lesscomplete:159:44: warning[SC3054]: In POSIX sh, array references are undefined. # 157| echo "$0: Too many levels of encapsulation" # 158| else # 159|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | isfinal "$ft" - "$rest11" # 160| fi # 161| fi Error: SHELLCHECK_WARNING: [#def615] /usr/libexec/less/lesscomplete:159:57: warning[SC3054]: In POSIX sh, array references are undefined. # 157| echo "$0: Too many levels of encapsulation" # 158| else # 159|-> "${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | isfinal "$ft" - "$rest11" # 160| fi # 161| fi Error: SHELLCHECK_WARNING: [#def616] /usr/libexec/less/lesscomplete:168:6: warning[SC3030]: In POSIX sh, arrays are undefined. # 166| fcat="${1##*:}" # 167| x="${1%%:*}" # 168|-> cmd=() # 169| [[ "$3" == $sep$sep ]] && return # 170| # uncompress Error: SHELLCHECK_WARNING: [#def617] /usr/libexec/less/lesscomplete:169:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 167| x="${1%%:*}" # 168| cmd=() # 169|-> [[ "$3" == $sep$sep ]] && return # 170| # uncompress # 171| case $x in Error: SHELLCHECK_WARNING: [#def618] /usr/libexec/less/lesscomplete:169:10: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 167| x="${1%%:*}" # 168| cmd=() # 169|-> [[ "$3" == $sep$sep ]] && return # 170| # uncompress # 171| case $x in Error: SHELLCHECK_WARNING: [#def619] /usr/libexec/less/lesscomplete:174:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 172| gzip|bzip2|lzip|lzma|xz|brotli|compress) # 173| # remember name of uncompressed file # 174|-> [[ $2 == - ]] || fileext="$2" # 175| fileext=${fileext%%.gz}; fileext=${fileext%%.bz2} # 176| [[ $x == compress ]] && x=gzip Error: SHELLCHECK_WARNING: [#def620] /usr/libexec/less/lesscomplete:174:10: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 172| gzip|bzip2|lzip|lzma|xz|brotli|compress) # 173| # remember name of uncompressed file # 174|-> [[ $2 == - ]] || fileext="$2" # 175| fileext=${fileext%%.gz}; fileext=${fileext%%.bz2} # 176| [[ $x == compress ]] && x=gzip Error: SHELLCHECK_WARNING: [#def621] /usr/libexec/less/lesscomplete:176:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 174| [[ $2 == - ]] || fileext="$2" # 175| fileext=${fileext%%.gz}; fileext=${fileext%%.bz2} # 176|-> [[ $x == compress ]] && x=gzip # 177| has_cmd "$x" && cmd=("$x" -cd "$2") ;; # 178| zstd) Error: SHELLCHECK_WARNING: [#def622] /usr/libexec/less/lesscomplete:176:10: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 174| [[ $2 == - ]] || fileext="$2" # 175| fileext=${fileext%%.gz}; fileext=${fileext%%.bz2} # 176|-> [[ $x == compress ]] && x=gzip # 177| has_cmd "$x" && cmd=("$x" -cd "$2") ;; # 178| zstd) Error: SHELLCHECK_WARNING: [#def623] /usr/libexec/less/lesscomplete:177:24: warning[SC3030]: In POSIX sh, arrays are undefined. # 175| fileext=${fileext%%.gz}; fileext=${fileext%%.bz2} # 176| [[ $x == compress ]] && x=gzip # 177|-> has_cmd "$x" && cmd=("$x" -cd "$2") ;; # 178| zstd) # 179| has_cmd zstd && cmd=(zstd -cdqM1073741824 "$2") ;; Error: SHELLCHECK_WARNING: [#def624] /usr/libexec/less/lesscomplete:179:24: warning[SC3030]: In POSIX sh, arrays are undefined. # 177| has_cmd "$x" && cmd=("$x" -cd "$2") ;; # 178| zstd) # 179|-> has_cmd zstd && cmd=(zstd -cdqM1073741824 "$2") ;; # 180| lz4) # 181| has_cmd lz4 && cmd=(lz4 -cdq "$2") ;; Error: SHELLCHECK_WARNING: [#def625] /usr/libexec/less/lesscomplete:181:23: warning[SC3030]: In POSIX sh, arrays are undefined. # 179| has_cmd zstd && cmd=(zstd -cdqM1073741824 "$2") ;; # 180| lz4) # 181|-> has_cmd lz4 && cmd=(lz4 -cdq "$2") ;; # 182| esac # 183| [[ ${cmd[*]} == '' ]] || return Error: SHELLCHECK_WARNING: [#def626] /usr/libexec/less/lesscomplete:183:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 181| has_cmd lz4 && cmd=(lz4 -cdq "$2") ;; # 182| esac # 183|-> [[ ${cmd[*]} == '' ]] || return # 184| [[ "$3" == "$sep" ]] && return # 185| file2=${3#"$sep"} Error: SHELLCHECK_WARNING: [#def627] /usr/libexec/less/lesscomplete:183:5: warning[SC3054]: In POSIX sh, array references are undefined. # 181| has_cmd lz4 && cmd=(lz4 -cdq "$2") ;; # 182| esac # 183|-> [[ ${cmd[*]} == '' ]] || return # 184| [[ "$3" == "$sep" ]] && return # 185| file2=${3#"$sep"} Error: SHELLCHECK_WARNING: [#def628] /usr/libexec/less/lesscomplete:183:15: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 181| has_cmd lz4 && cmd=(lz4 -cdq "$2") ;; # 182| esac # 183|-> [[ ${cmd[*]} == '' ]] || return # 184| [[ "$3" == "$sep" ]] && return # 185| file2=${3#"$sep"} Error: SHELLCHECK_WARNING: [#def629] /usr/libexec/less/lesscomplete:184:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 182| esac # 183| [[ ${cmd[*]} == '' ]] || return # 184|-> [[ "$3" == "$sep" ]] && return # 185| file2=${3#"$sep"} # 186| file2=${file2%%"$sep"*} Error: SHELLCHECK_WARNING: [#def630] /usr/libexec/less/lesscomplete:184:10: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 182| esac # 183| [[ ${cmd[*]} == '' ]] || return # 184|-> [[ "$3" == "$sep" ]] && return # 185| file2=${3#"$sep"} # 186| file2=${file2%%"$sep"*} Error: SHELLCHECK_WARNING: [#def631] /usr/libexec/less/lesscomplete:188:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 186| file2=${file2%%"$sep"*} # 187| # remember name of file to extract or file type # 188|-> [[ -n "$file2" ]] && fileext="$file2" # 189| # extract from archive # 190| rest1="$rest2" Error: SHELLCHECK_WARNING: [#def632] /usr/libexec/less/lesscomplete:199:31: warning[SC3030]: In POSIX sh, arrays are undefined. # 197| rpm) # 198| { has_cmd cpio && has_cmd rpm2cpio; } || # 199|-> { has_cmd bsdtar; } && cmd=(isrpm "$2" "$file2") ;; # 200| java-archive|zip) # 201| { has_cmd bsdtar && prog=bsdtar; } || Error: SHELLCHECK_WARNING: [#def633] /usr/libexec/less/lesscomplete:204:45: warning[SC3030]: In POSIX sh, arrays are undefined. # 202| { has_cmd unzip && prog=unzip; } ;; # 203| debian*-package) # 204|-> { has_cmd ar || has_cmd bsdtar; } && cmd=(isdeb "$2" "$file2") ;; # 205| rar) # 206| { has_cmd bsdtar && prog=bsdtar; } || Error: SHELLCHECK_WARNING: [#def634] /usr/libexec/less/lesscomplete:222:30: warning[SC3030]: In POSIX sh, arrays are undefined. # 220| { has_cmd bsdtar && prog=bsdtar; } ;; # 221| appimage|snap) # 222|-> has_cmd unsquashfs && cmd=(isimage "$x" "$2" "$file2") ;; # 223| esac # 224| # 7z formats and fall back to 7z supported formats Error: SHELLCHECK_WARNING: [#def635] /usr/libexec/less/lesscomplete:225:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 223| esac # 224| # 7z formats and fall back to 7z supported formats # 225|-> if [[ -z $prog ]]; then # 226| case "$x" in # 227| dmg) Error: SHELLCHECK_WARNING: [#def636] /usr/libexec/less/lesscomplete:236:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 234| esac # 235| fi # 236|-> if [[ "$prog" = ar && "$2" = *@* ]]; then # 237| t=$(nexttmp) # 238| cat "$2" > "$t" Error: SHELLCHECK_WARNING: [#def637] /usr/libexec/less/lesscomplete:241:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 239| set "$2" "$t" # 240| fi # 241|-> [[ -n $prog ]] && cmd=(isarchive "$prog" "$2" "$file2") # 242| if [[ -n ${cmd[*]} ]]; then # 243| [[ -n "$file2" ]] && file2= && return Error: SHELLCHECK_WARNING: [#def638] /usr/libexec/less/lesscomplete:241:24: warning[SC3030]: In POSIX sh, arrays are undefined. # 239| set "$2" "$t" # 240| fi # 241|-> [[ -n $prog ]] && cmd=(isarchive "$prog" "$2" "$file2") # 242| if [[ -n ${cmd[*]} ]]; then # 243| [[ -n "$file2" ]] && file2= && return Error: SHELLCHECK_WARNING: [#def639] /usr/libexec/less/lesscomplete:242:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 240| fi # 241| [[ -n $prog ]] && cmd=(isarchive "$prog" "$2" "$file2") # 242|-> if [[ -n ${cmd[*]} ]]; then # 243| [[ -n "$file2" ]] && file2= && return # 244| colorizer='cat' Error: SHELLCHECK_WARNING: [#def640] /usr/libexec/less/lesscomplete:242:11: warning[SC3054]: In POSIX sh, array references are undefined. # 240| fi # 241| [[ -n $prog ]] && cmd=(isarchive "$prog" "$2" "$file2") # 242|-> if [[ -n ${cmd[*]} ]]; then # 243| [[ -n "$file2" ]] && file2= && return # 244| colorizer='cat' Error: SHELLCHECK_WARNING: [#def641] /usr/libexec/less/lesscomplete:243:3: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 241| [[ -n $prog ]] && cmd=(isarchive "$prog" "$2" "$file2") # 242| if [[ -n ${cmd[*]} ]]; then # 243|-> [[ -n "$file2" ]] && file2= && return # 244| colorizer='cat' # 245| fi Error: SHELLCHECK_WARNING: [#def642] /usr/libexec/less/lesscomplete:249:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 247| # 248| isfinal () { # 249|-> [[ -n $cmd && $colorizer == 'cat' ]] && "${cmd[@]}" # 250| } # 251| Error: SHELLCHECK_WARNING: [#def643] /usr/libexec/less/lesscomplete:249:27: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 247| # 248| isfinal () { # 249|-> [[ -n $cmd && $colorizer == 'cat' ]] && "${cmd[@]}" # 250| } # 251| Error: SHELLCHECK_WARNING: [#def644] /usr/libexec/less/lesscomplete:249:43: warning[SC3054]: In POSIX sh, array references are undefined. # 247| # 248| isfinal () { # 249|-> [[ -n $cmd && $colorizer == 'cat' ]] && "${cmd[@]}" # 250| } # 251| Error: SHELLCHECK_WARNING: [#def645] /usr/libexec/less/lesscomplete:254:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 252| isarchive () { # 253| prog=$1 # 254|-> if [[ -n $3 ]]; then # 255| case $prog in # 256| tar|bsdtar) Error: SHELLCHECK_WARNING: [#def646] /usr/libexec/less/lesscomplete:269:8: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 267| istemp "isoinfo -i" "$2" "-x$3" ;; # 268| cpio) # 269|-> if [[ "$2" == - ]]; then # 270| cpio -i --quiet --to-stdout "$3" # 271| else Error: SHELLCHECK_WARNING: [#def647] /usr/libexec/less/lesscomplete:269:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 267| istemp "isoinfo -i" "$2" "-x$3" ;; # 268| cpio) # 269|-> if [[ "$2" == - ]]; then # 270| cpio -i --quiet --to-stdout "$3" # 271| else Error: SHELLCHECK_WARNING: [#def648] /usr/libexec/less/lesscomplete:307:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 305| # 306| isimage () { # 307|-> if [[ "$1" == appimage ]]; then # 308| offset="-o $("$2" --appimage-offset)" # 309| fi Error: SHELLCHECK_WARNING: [#def649] /usr/libexec/less/lesscomplete:307:13: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 305| # 306| isimage () { # 307|-> if [[ "$1" == appimage ]]; then # 308| offset="-o $("$2" --appimage-offset)" # 309| fi Error: SHELLCHECK_WARNING: [#def650] /usr/libexec/less/lesscomplete:310:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 308| offset="-o $("$2" --appimage-offset)" # 309| fi # 310|-> if [[ -z "$3" ]]; then # 311| istemp "unsquashfs -d . -lc $offset" "$2" # 312| else Error: SHELLCHECK_WARNING: [#def651] /usr/libexec/less/lesscomplete:318:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 316| # 317| isrpm () { # 318|-> if [[ -z "$2" ]]; then # 319| if has_cmd bsdtar; then # 320| bsdtar tf "$1" Error: SHELLCHECK_WARNING: [#def652] /usr/libexec/less/lesscomplete:332:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 330| # 331| isdeb () { # 332|-> if [[ "$1" = - ]]; then # 333| t=$(nexttmp) # 334| cat > "$t" Error: SHELLCHECK_WARNING: [#def653] /usr/libexec/less/lesscomplete:339:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 337| if has_cmd bsdtar; then # 338| data=$(bsdtar tf "$1" "data*") # 339|-> if [[ -z "$2" ]]; then # 340| bsdtar xOf "$1" "$data" | bsdtar tf - # 341| else Error: SHELLCHECK_WARNING: [#def654] /usr/libexec/less/lesscomplete:345:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 343| fi # 344| else # 345|-> if [[ "$1" = *@* ]]; then # 346| t=$(nexttmp) # 347| cat "$1" > "$t" Error: SHELLCHECK_WARNING: [#def655] /usr/libexec/less/lesscomplete:353:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 351| ft=$(ar p "$1" "$data" | filetype -) # 352| get_unpack_cmd "$ft" - # 353|-> if [[ -z "$2" ]]; then # 354| ar p "$1" "$data" | "${cmd[@]}" | tar tf - # 355| else Error: SHELLCHECK_WARNING: [#def656] /usr/libexec/less/lesscomplete:354:25: warning[SC3054]: In POSIX sh, array references are undefined. # 352| get_unpack_cmd "$ft" - # 353| if [[ -z "$2" ]]; then # 354|-> ar p "$1" "$data" | "${cmd[@]}" | tar tf - # 355| else # 356| ar p "$1" "$data" | "${cmd[@]}" | tar xOf - "$2" Error: SHELLCHECK_WARNING: [#def657] /usr/libexec/less/lesscomplete:356:25: warning[SC3054]: In POSIX sh, array references are undefined. # 354| ar p "$1" "$data" | "${cmd[@]}" | tar tf - # 355| else # 356|-> ar p "$1" "$data" | "${cmd[@]}" | tar xOf - "$2" # 357| fi # 358| fi Error: SHELLCHECK_WARNING: [#def658] /usr/libexec/less/lesscomplete:363:1: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 361| # the main program # 362| # LESSOPEN needs to be set to complete names in archives # 363|-> [[ "$LESSOPEN" == *\|* ]] || exit 0 # 364| set +o noclobber # 365| [[ -n "$ZSH_VERSION" ]] && setopt sh_word_split Error: SHELLCHECK_WARNING: [#def659] /usr/libexec/less/lesscomplete:363:16: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 361| # the main program # 362| # LESSOPEN needs to be set to complete names in archives # 363|-> [[ "$LESSOPEN" == *\|* ]] || exit 0 # 364| set +o noclobber # 365| [[ -n "$ZSH_VERSION" ]] && setopt sh_word_split Error: SHELLCHECK_WARNING: [#def660] /usr/libexec/less/lesscomplete:365:1: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 363| [[ "$LESSOPEN" == *\|* ]] || exit 0 # 364| set +o noclobber # 365|-> [[ -n "$ZSH_VERSION" ]] && setopt sh_word_split # 366| # tilde and escaped chars file name expansion # 367| a="${1/#\~/$HOME}" Error: SHELLCHECK_WARNING: [#def661] /usr/libexec/less/lesscomplete:367:4: warning[SC3060]: In POSIX sh, string replacement is undefined. # 365| [[ -n "$ZSH_VERSION" ]] && setopt sh_word_split # 366| # tilde and escaped chars file name expansion # 367|-> a="${1/#\~/$HOME}" # 368| a="${a//\\/}" # 369| sep=: # file name separator Error: SHELLCHECK_WARNING: [#def662] /usr/libexec/less/lesscomplete:368:4: warning[SC3060]: In POSIX sh, string replacement is undefined. # 366| # tilde and escaped chars file name expansion # 367| a="${1/#\~/$HOME}" # 368|-> a="${a//\\/}" # 369| sep=: # file name separator # 370| altsep='=' # alternate separator character Error: SHELLCHECK_WARNING: [#def663] /usr/libexec/less/lesscomplete:371:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 369| sep=: # file name separator # 370| altsep='=' # alternate separator character # 371|-> if [[ -e "$a" && "$a" == *"$sep"* ]]; then # 372| sep=$altsep # 373| elif [[ "$a" == *"$altsep"* ]]; then Error: SHELLCHECK_WARNING: [#def664] /usr/libexec/less/lesscomplete:371:23: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 369| sep=: # file name separator # 370| altsep='=' # alternate separator character # 371|-> if [[ -e "$a" && "$a" == *"$sep"* ]]; then # 372| sep=$altsep # 373| elif [[ "$a" == *"$altsep"* ]]; then Error: SHELLCHECK_WARNING: [#def665] /usr/libexec/less/lesscomplete:373:6: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 371| if [[ -e "$a" && "$a" == *"$sep"* ]]; then # 372| sep=$altsep # 373|-> elif [[ "$a" == *"$altsep"* ]]; then # 374| [[ -e "${a%%"$altsep"*}" ]] && sep=$altsep # 375| fi Error: SHELLCHECK_WARNING: [#def666] /usr/libexec/less/lesscomplete:373:14: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 371| if [[ -e "$a" && "$a" == *"$sep"* ]]; then # 372| sep=$altsep # 373|-> elif [[ "$a" == *"$altsep"* ]]; then # 374| [[ -e "${a%%"$altsep"*}" ]] && sep=$altsep # 375| fi Error: SHELLCHECK_WARNING: [#def667] /usr/libexec/less/lesscomplete:374:2: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 372| sep=$altsep # 373| elif [[ "$a" == *"$altsep"* ]]; then # 374|-> [[ -e "${a%%"$altsep"*}" ]] && sep=$altsep # 375| fi # 376| Error: SHELLCHECK_WARNING: [#def668] /usr/libexec/less/lesscomplete:378:33: warning[SC3048]: In POSIX sh, prefixing signal names with 'SIG' is undefined. # 376| # 377| tmpdir=$(mktemp -d --tmpdir "lesspipe.XXXXXX") || exit 1 # 378|-> trap 'rm -rf "$tmpdir"; exit 1' SIGINT # 379| trap 'rm -rf "$tmpdir"' EXIT # 380| trap - PIPE Error: SHELLCHECK_WARNING: [#def669] /usr/libexec/less/lesscomplete:383:4: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 381| # 382| # make LESSOPEN="|- ... " work # 383|-> if [[ $LESSOPEN == *\|-* && $1 == - ]]; then # 384| t=$(nexttmp) # 385| cat > "$t" Error: SHELLCHECK_WARNING: [#def670] /usr/libexec/less/lesscomplete:383:17: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 381| # 382| # make LESSOPEN="|- ... " work # 383|-> if [[ $LESSOPEN == *\|-* && $1 == - ]]; then # 384| t=$(nexttmp) # 385| cat > "$t" Error: SHELLCHECK_WARNING: [#def671] /usr/libexec/less/lesscomplete:383:32: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 381| # 382| # make LESSOPEN="|- ... " work # 383|-> if [[ $LESSOPEN == *\|-* && $1 == - ]]; then # 384| t=$(nexttmp) # 385| cat > "$t" Error: COMPILER_WARNING (CWE-252): [#def672] less-692/ch.c: scope_hint: In function ‘ch_get’ less-692/ch.c:311:33: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ # 311 | write(logfile, &bp->data[bp->datasize], (size_t) n); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 309| { # 310| if (logfile >= 0 && n > 0) # 311|-> write(logfile, &bp->data[bp->datasize], (size_t) n); # 312| } # 313| #endif Error: COMPILER_WARNING (CWE-252): [#def673] less-692/ch.c: scope_hint: In function ‘sync_logfile’ less-692/ch.c:448:33: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ # 448 | write(logfile, bp->data, bp->datasize); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 446| if (bp->block == block) # 447| { # 448|-> write(logfile, bp->data, bp->datasize); # 449| wrote = TRUE; # 450| break; Error: GCC_ANALYZER_WARNING (CWE-416): [#def674] less-692/ch.c:809:17: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘*thisfile.buflist.next’ less-692/ch.c:806:16: branch_true: following ‘true’ branch... less-692/ch.c:809:17: branch_true: ...to here less-692/ch.c:810:17: release_memory: freed here less-692/ch.c:806:16: branch_true: following ‘true’ branch... less-692/ch.c:809:17: branch_true: ...to here less-692/ch.c:809:17: danger: use after ‘free’ of ‘*thisfile.buflist.next’; freed at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3) # 807| { # 808| bn = ch_bufhead; # 809|-> BUF_RM(bn); # 810| free(bufnode_buf(bn)); # 811| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def675] less-692/decode.c:527:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ less-692/decode.c:1071:12: enter_function: entry to ‘lesskey’ less-692/decode.c:1084:12: branch_false: following ‘false’ branch... less-692/decode.c:1095:15: branch_false: ...to here less-692/decode.c:1096:12: branch_false: following ‘false’ branch... less-692/decode.c:1104:38: branch_false: ...to here less-692/decode.c:1104:38: acquire_memory: allocated here less-692/decode.c:1104:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)... less-692/decode.c:1109:13: branch_false: ...to here less-692/decode.c:1109:12: branch_false: following ‘false’ branch... less-692/decode.c:1115:13: branch_false: ...to here less-692/decode.c:1117:12: branch_false: following ‘false’ branch... less-692/decode.c:1127:12: branch_false: ...to here less-692/decode.c:1127:12: branch_false: following ‘false’ branch... less-692/decode.c:1128:13: branch_false: ...to here less-692/decode.c:1127:13: branch_false: following ‘false’ branch... less-692/decode.c:1128:43: branch_false: ...to here less-692/decode.c:1127:13: branch_false: following ‘false’ branch... less-692/decode.c:1129:13: branch_false: ...to here less-692/decode.c:1127:13: branch_false: following ‘false’ branch... less-692/decode.c:1129:43: branch_false: ...to here less-692/decode.c:1127:13: branch_false: following ‘false’ branch... less-692/decode.c:1131:16: branch_false: ...to here less-692/decode.c:1131:16: call_function: calling ‘new_lesskey’ from ‘lesskey’ less-692/decode.c:1131:16: return_function: returning to ‘lesskey’ from ‘new_lesskey’ less-692/decode.c:527:1: danger: ‘buf’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5) # 525| if (add_cmd_table(&list_ecmd_tables, buf, len) < 0) # 526| error("Warning: some edit commands disabled", NULL_PARG); # 527|-> } # 528| # 529| /* Error: GCC_ANALYZER_WARNING (CWE-401): [#def676] less-692/decode.c:1130:24: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ less-692/decode.c:1084:12: branch_false: following ‘false’ branch... less-692/decode.c:1095:15: branch_false: ...to here less-692/decode.c:1096:12: branch_false: following ‘false’ branch... less-692/decode.c:1104:38: branch_false: ...to here less-692/decode.c:1104:38: acquire_memory: allocated here less-692/decode.c:1104:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)... less-692/decode.c:1109:13: branch_false: ...to here less-692/decode.c:1109:12: branch_false: following ‘false’ branch... less-692/decode.c:1115:13: branch_false: ...to here less-692/decode.c:1117:12: branch_false: following ‘false’ branch... less-692/decode.c:1127:12: branch_false: ...to here less-692/decode.c:1130:24: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4) # 1128| buf[0] != C0_LESSKEY_MAGIC || buf[1] != C1_LESSKEY_MAGIC || # 1129| buf[2] != C2_LESSKEY_MAGIC || buf[3] != C3_LESSKEY_MAGIC) # 1130|-> return (old_lesskey(buf, (size_t) len)); # 1131| return (new_lesskey(buf, (size_t) len, sysvar)); # 1132| } Error: COMPILER_WARNING (CWE-457): [#def677] less-692/edit.c:609:9: warning[-Wmaybe-uninitialized]: ‘alt_filename’ may be used uninitialized # 609 | set_altfilename(curr_ifile, alt_filename); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ less-692/edit.c:440:15: note: ‘alt_filename’ was declared here # 440 | char *alt_filename; # | ^~~~~~~~~~~~ # 607| curr_ifile = ifile; # 608| soft_eof = NULL_POSITION; # 609|-> set_altfilename(curr_ifile, alt_filename); # 610| set_altpipe(curr_ifile, altpipe); # 611| set_open(curr_ifile); /* File has been opened */ Error: COMPILER_WARNING (CWE-457): [#def678] less-692/edit.c: scope_hint: In function ‘edit_ifile’ less-692/edit.c:613:9: warning[-Wmaybe-uninitialized]: ‘chflags’ may be used uninitialized # 613 | ch_init(f, chflags, nread); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ less-692/edit.c:437:13: note: ‘chflags’ was declared here # 437 | int chflags; # | ^~~~~~~ # 611| set_open(curr_ifile); /* File has been opened */ # 612| get_pos(curr_ifile, &initial_scrpos); # 613|-> ch_init(f, chflags, nread); # 614| consecutive_nulls = 0; # 615| check_modelines(); Error: COMPILER_WARNING (CWE-457): [#def679] less-692/edit.c:627:21: warning[-Wmaybe-uninitialized]: ‘open_filename’ may be used uninitialized # 627 | if (strcmp(open_filename, "-") != 0) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ less-692/edit.c:439:24: note: ‘open_filename’ was declared here # 439 | constant char *open_filename; # | ^~~~~~~~~~~~~ # 625| #if HAVE_STAT_INO # 626| /* Remember the i-number and device of the opened file. */ # 627|-> if (strcmp(open_filename, "-") != 0) # 628| { # 629| struct stat statbuf; Error: COMPILER_WARNING (CWE-457): [#def680] less-692/edit.c:663:21: warning[-Wmaybe-uninitialized]: ‘filename’ may be used uninitialized # 663 | if (strcmp(filename, FAKE_HELPFILE) && strcmp(filename, FAKE_EMPTYFILE)) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ less-692/edit.c:438:24: note: ‘filename’ was declared here # 438 | constant char *filename; # | ^~~~~~~~ # 661| undo_osc8(); # 662| hshift = 0; # 663|-> if (strcmp(filename, FAKE_HELPFILE) && strcmp(filename, FAKE_EMPTYFILE)) # 664| { # 665| char *qfilename = shell_quote(filename); Error: CPPCHECK_WARNING (CWE-457): [#def681] less-692/line.c:1932: warning[uninitvar]: Uninitialized variable: pos # 1930| if ((pos = position(sindex)) != NULL_POSITION) # 1931| break; # 1932|-> for (; sindex < sc_height-1 && pos != NULL_POSITION; sindex++) # 1933| { # 1934| pos = forw_line(pos, NULL, NULL); Error: GCC_ANALYZER_WARNING (CWE-476): [#def682] less-692/linenum.c:197:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ less-692/linenum.c:271:16: enter_function: entry to ‘find_linenum’ less-692/linenum.c:299:12: branch_false: following ‘false’ branch... less-692/linenum.c:314:9: call_function: inlined call to ‘start_delayed_msg’ from ‘find_linenum’ less-692/linenum.c:321:20: branch_false: following ‘false’ branch... less-692/linenum.c:323:22: branch_false: ...to here less-692/linenum.c:340:17: call_function: calling ‘add_lnum’ from ‘find_linenum’ # 195| } # 196| } # 197|-> spare->next->prev = spare->prev; # 198| spare->prev->next = spare->next; # 199| } Error: GCC_ANALYZER_WARNING: [#def683] less-692/lsystem.c:119:17: warning[-Wanalyzer-fd-use-without-check]: ‘dup’ on possibly invalid file descriptor ‘inp’ less-692/lsystem.c:114:15: acquire_resource: opened here less-692/lsystem.c:117:12: branch_true: following ‘true’ branch... less-692/lsystem.c:119:17: branch_true: ...to here less-692/lsystem.c:119:17: danger: ‘inp’ could be invalid: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 117| if (open_tty() < 0) # 118| #endif # 119|-> dup(inp); # 120| #endif # 121| Error: COMPILER_WARNING (CWE-252): [#def684] less-692/lsystem.c: scope_hint: In function ‘lsystem’ less-692/lsystem.c:119:17: warning[-Wunused-result]: ignoring return value of ‘dup’ declared with attribute ‘warn_unused_result’ # 119 | dup(inp); # | ^~~~~~~~ # 117| if (open_tty() < 0) # 118| #endif # 119|-> dup(inp); # 120| #endif # 121| Error: COMPILER_WARNING (CWE-252): [#def685] less-692/lsystem.c:154:9: warning[-Wunused-result]: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ # 154 | system(p); # | ^~~~~~~~~ # 152| p = save(cmd); # 153| } # 154|-> system(p); # 155| free(p); # 156| #else Error: GCC_ANALYZER_WARNING (CWE-1341): [#def686] less-692/lsystem.c:178:9: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘0’ less-692/lsystem.c:115:9: release_resource: first ‘close’ here less-692/lsystem.c:178:9: danger: second ‘close’ here; first ‘close’ was at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 176| * Restore standard input, reset signals, raw mode, etc. # 177| */ # 178|-> close(0); # 179| dup(inp); # 180| close(inp); Error: GCC_ANALYZER_WARNING: [#def687] less-692/lsystem.c:179:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup’ on possibly invalid file descriptor ‘inp’ less-692/lsystem.c:114:15: acquire_resource: opened here less-692/lsystem.c:179:9: danger: ‘inp’ could be invalid: unchecked value from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0) # 177| */ # 178| close(0); # 179|-> dup(inp); # 180| close(inp); # 181| #endif Error: COMPILER_WARNING (CWE-252): [#def688] less-692/lsystem.c:179:9: warning[-Wunused-result]: ignoring return value of ‘dup’ declared with attribute ‘warn_unused_result’ # 179 | dup(inp); # | ^~~~~~~~ # 177| */ # 178| close(0); # 179|-> dup(inp); # 180| close(inp); # 181| #endif Error: CPPCHECK_WARNING (CWE-909): [#def689] less-692/position.c:127: error[uninitStructMember]: Uninitialized struct member: scrpos.ln # 125| pos_clear(); # 126| if (scrpos.pos != NULL_POSITION) # 127|-> table[scrpos.ln-1] = scrpos.pos; # 128| } # 129| Error: GCC_ANALYZER_WARNING (CWE-416): [#def690] less-692/tags.c:102:17: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘tp’ less-692/tags.c:485:24: enter_function: entry to ‘findgtag’ less-692/tags.c:491:12: branch_false: following ‘false’ branch... less-692/tags.c:494:9: branch_false: ...to here less-692/tags.c:494:9: call_function: calling ‘cleantags’ from ‘findgtag’ # 100| while ((tp = taglist.tl_first) != TAG_END) # 101| { # 102|-> TAG_RM(tp); # 103| free(tp->tag_file); # 104| free(tp->tag_pattern); Error: GCC_ANALYZER_WARNING (CWE-415): [#def691] less-692/tags.c:103:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*tp.tag_file’ less-692/tags.c:485:24: enter_function: entry to ‘findgtag’ less-692/tags.c:491:12: branch_false: following ‘false’ branch... less-692/tags.c:494:9: branch_false: ...to here less-692/tags.c:494:9: call_function: calling ‘cleantags’ from ‘findgtag’ # 101| { # 102| TAG_RM(tp); # 103|-> free(tp->tag_file); # 104| free(tp->tag_pattern); # 105| free(tp); Error: GCC_ANALYZER_WARNING (CWE-415): [#def692] less-692/tags.c:104:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*tp.tag_pattern’ less-692/tags.c:485:24: enter_function: entry to ‘findgtag’ less-692/tags.c:491:12: branch_false: following ‘false’ branch... less-692/tags.c:494:9: branch_false: ...to here less-692/tags.c:494:9: call_function: calling ‘cleantags’ from ‘findgtag’ # 102| TAG_RM(tp); # 103| free(tp->tag_file); # 104|-> free(tp->tag_pattern); # 105| free(tp); # 106| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def693] less-692/tags.c:109:1: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’ less-692/tags.c:485:24: enter_function: entry to ‘findgtag’ less-692/tags.c:491:12: branch_false: following ‘false’ branch... less-692/tags.c:494:9: branch_false: ...to here less-692/tags.c:494:9: call_function: calling ‘cleantags’ from ‘findgtag’ less-692/tags.c:494:9: return_function: returning to ‘findgtag’ from ‘cleantags’ less-692/tags.c:501:12: branch_false: following ‘false’ branch (when ‘type != 1’)... less-692/tags.c:514:38: branch_false: ...to here less-692/tags.c:516:20: branch_false: following ‘false’ branch... less-692/tags.c:519:17: branch_false: ...to here less-692/tags.c:519:17: branch_true: following ‘true’ branch... less-692/tags.c:519:17: branch_true: ...to here less-692/tags.c:545:22: acquire_memory: allocated here less-692/tags.c:549:12: branch_true: following ‘true’ branch (when ‘fp’ is non-NULL)... less-692/tags.c:549:12: branch_true: ...to here less-692/tags.c:551:24: branch_true: following ‘true’ branch... less-692/tags.c:558:29: branch_true: ...to here less-692/tags.c:558:28: branch_true: following ‘true’ branch... less-692/tags.c:561:37: branch_true: ...to here less-692/tags.c:561:36: branch_false: following ‘false’ branch... less-692/tags.c:564:40: branch_false: ...to here less-692/tags.c:109:1: danger: ‘fp’ leaks here; was allocated at [(15)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/14) # 107| curtag = NULL; # 108| total = curseq = 0; # 109|-> } # 110| # 111| /* Error: GCC_ANALYZER_WARNING (CWE-131): [#def694] less-692/tags.c:358:17: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size less-692/tags.c:253:24: enter_function: entry to ‘findctag’ less-692/tags.c:271:12: branch_false: following ‘false’ branch... less-692/tags.c:274:9: branch_false: ...to here less-692/tags.c:274:9: call_function: calling ‘cleantags’ from ‘findctag’ less-692/tags.c:274:9: return_function: returning to ‘findctag’ from ‘cleantags’ less-692/tags.c:281:16: branch_true: following ‘true’ branch... less-692/tags.c:283:21: branch_true: ...to here less-692/tags.c:316:20: branch_false: following ‘false’ branch... less-692/tags.c:324:21: branch_false: ...to here less-692/tags.c:324:20: branch_true: following ‘true’ branch... less-692/tags.c:325:25: branch_true: ...to here less-692/tags.c:357:22: call_function: calling ‘maketagent’ from ‘findctag’ less-692/tags.c:357:22: return_function: returning to ‘findctag’ from ‘maketagent’ less-692/tags.c:358:17: danger: assigned to ‘struct tag *’ here; ‘sizeof (struct tag)’ is ‘48’ # 356| } # 357| tp = maketagent(tagfile, taglinenum, tagpattern, tagendline); # 358|-> TAG_INS(tp); # 359| total++; # 360| }
| analyzer-version-clippy | 1.95.0 |
| analyzer-version-cppcheck | 2.20.0 |
| analyzer-version-gcc | 16.1.1 |
| analyzer-version-gcc-analyzer | 16.1.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-7.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | less-692-7.fc45 |
| store-results-to | /tmp/tmpeewpxbmw/less-692-7.fc45.tar.xz |
| time-created | 2026-06-01 14:13:02 |
| time-finished | 2026-06-01 14:14:21 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpeewpxbmw/less-692-7.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpeewpxbmw/less-692-7.fc45.src.rpm' |
| tool-version | csmock-3.8.5.20260529.133039.g6f3b5c6-1.el9 |