In /usr/bin/keychain line 70: if [ -n "$LANG$LC_ALL" ] || [ -n "$(locale 2>/dev/null | egrep -v '="?(|POSIX|C)"?$' 2>/dev/null)" ]; then ^-- SC2143: Use egrep -q instead of comparing output with [ -n .. ]. ^---^ SC2196: egrep is non-standard and deprecated. Use grep -E instead. In /usr/bin/keychain line 367: if kill -0 $(cat $lockf 2>/dev/null) 2>/dev/null; then ^-----------------------^ SC2046: Quote this to prevent word splitting. ^----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if kill -0 $(cat "$lockf" 2>/dev/null) 2>/dev/null; then In /usr/bin/keychain line 391: while [ "$counter" -lt "$(( $lockwait * 2 ))" ] ^-------^ SC2004: $/${} is unnecessary on arithmetic variables. In /usr/bin/keychain line 394: sleep 0.5; counter=$(( $counter + 1 )) ^------^ SC2004: $/${} is unnecessary on arithmetic variables. In /usr/bin/keychain line 425: fp_psout=$(ps -u $me 2>/dev/null) ;; # SysV syntax ^-^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: fp_psout=$(ps -u "$me" 2>/dev/null) ;; # SysV syntax In /usr/bin/keychain line 429: fp_psout=$(ps -u $me 2>/dev/null) ;; # SysV syntax ^-^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: fp_psout=$(ps -u "$me" 2>/dev/null) ;; # SysV syntax In /usr/bin/keychain line 440: fp_psout=$(UNIX95=1 ps -u $me -o pid,comm 2>/dev/null | grep '^ *[0-9]') ^-- SC2009: Consider using pgrep instead of grepping ps output. ^-^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: fp_psout=$(UNIX95=1 ps -u "$me" -o pid,comm 2>/dev/null | grep '^ *[0-9]') In /usr/bin/keychain line 466: eval stop_except=\$\{${stop_prog}_agent_pid\} ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: eval stop_except=\$\{"${stop_prog}"_agent_pid\} In /usr/bin/keychain line 468: [ $? = 0 ] || die ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 477: kill $stop_mypids >/dev/null 2>&1 ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: kill "$stop_mypids" >/dev/null 2>&1 In /usr/bin/keychain line 483: kill -0 $stop_except >/dev/null 2>&1 ^----------^ SC2154: stop_except is referenced but not assigned. ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: kill -0 "$stop_except" >/dev/null 2>&1 In /usr/bin/keychain line 484: if [ -z "$stop_except" -o $? != 0 -o \ ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. In /usr/bin/keychain line 485: "$inheritwhich" = local -o "$inheritwhich" = any ]; then ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. In /usr/bin/keychain line 487: eval stop_except=\$\{inherit_${stop_prog}_agent_pid\} ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: eval stop_except=\$\{inherit_"${stop_prog}"_agent_pid\} In /usr/bin/keychain line 488: kill -0 $stop_except >/dev/null 2>&1 ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: kill -0 "$stop_except" >/dev/null 2>&1 In /usr/bin/keychain line 489: if [ -z "$stop_except" -o $? != 0 ]; then ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 491: eval stop_except=\$\{inherit_${stop_prog}2_agent_pid\} ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: eval stop_except=\$\{inherit_"${stop_prog}"2_agent_pid\} In /usr/bin/keychain line 499: [ $stop_x -eq $stop_except ] 2>/dev/null && continue ^-----^ SC2086: Double quote to prevent globbing and word splitting. ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: [ "$stop_x" -eq "$stop_except" ] 2>/dev/null && continue In /usr/bin/keychain line 504: kill $stop_mynewpids >/dev/null 2>&1 ^-------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: kill "$stop_mynewpids" >/dev/null 2>&1 In /usr/bin/keychain line 512: if [ $stop_except -gt 0 ] 2>/dev/null; then ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ "$stop_except" -gt 0 ] 2>/dev/null; then In /usr/bin/keychain line 513: kill $stop_except >/dev/null 2>&1 ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: kill "$stop_except" >/dev/null 2>&1 In /usr/bin/keychain line 529: eval unset ${stop_prog}_agent_pid ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: eval unset "${stop_prog}"_agent_pid In /usr/bin/keychain line 544: if [ -n "$SSH_AUTH_SOCK" ]; then ^------------^ SC2153: Possible misspelling: SSH_AUTH_SOCK may not be assigned, but ssh_auth_sock is. In /usr/bin/keychain line 546: inherit_ssh_agent_pid="$SSH_AGENT_PID" ^------------^ SC2153: Possible misspelling: SSH_AGENT_PID may not be assigned, but ssh_agent_pid is. In /usr/bin/keychain line 583: if [ $? != 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 592: if [ $? != 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 602: if [ $? != 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 650: eval "$(catpidf_shell sh $la_a)" ^---^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: eval "$(catpidf_shell sh "$la_a")" In /usr/bin/keychain line 655: ssh_auth_sock=$SSH2_AUTH_SOCK ^-----------^ SC2034: ssh_auth_sock appears unused. Verify use (or export if used externally). In /usr/bin/keychain line 664: eval "$(catpidf_shell sh $la_a)" ^---^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: eval "$(catpidf_shell sh "$la_a")" In /usr/bin/keychain line 668: set -- $GPG_AGENT_INFO ^-------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: set -- "$GPG_AGENT_INFO" In /usr/bin/keychain line 675: eval "$(catpidf_shell sh $la_a)" ^---^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: eval "$(catpidf_shell sh "$la_a")" In /usr/bin/keychain line 688: start_proto=${2-${start_prog}} ^---------^ SC2034: start_proto appears unused. Verify use (or export if used externally). In /usr/bin/keychain line 692: [ $? = 0 ] || die ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 701: if [ -n "$inherit_ssh_auth_sock" -o -n "$inherit_ssh2_auth_sock" ]; then ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. In /usr/bin/keychain line 727: if [ "$inheritwhich" = any -o "$inheritwhich" = any-once ]; then ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. In /usr/bin/keychain line 744: if [ $? != 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 762: if [ $? != 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 770: if [ $? != 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 778: if [ $? != 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 792: start_out=$(ssh-agent ${ssh_timeout}) ^------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: start_out=$(ssh-agent "${ssh_timeout}") In /usr/bin/keychain line 795: gpg_cache_ttl="$(expr $timeout \* 60)" ^--^ SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]]. ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: gpg_cache_ttl="$(expr "$timeout" \* 60)" In /usr/bin/keychain line 801: start_out=$(gpg-agent --daemon --write-env-file $start_gpg_timeout 2>/dev/null) ^----------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: start_out=$(gpg-agent --daemon --write-env-file "$start_gpg_timeout" 2>/dev/null) In /usr/bin/keychain line 806: if [ $? != 0 -a $? != 2 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In /usr/bin/keychain line 812: elif [ "$start_prog" = ssh -a -n "$inherit_ssh_auth_sock" ]; then ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In /usr/bin/keychain line 818: elif [ "$start_prog" = ssh -a -n "$inherit_ssh2_auth_sock" ]; then ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In /usr/bin/keychain line 826: elif [ "$start_prog" = "${gpg_prog_name}" -a -n "$inherit_gpg_agent_info" ]; then ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In /usr/bin/keychain line 859: while read ef_line; do ^--^ SC2162: read without -r will mangle backslashes. In /usr/bin/keychain line 958: if [ -L "$sf_filename" ] && [ ! -z "$realpath_bin" ]; then ^-- SC2236: Use -n instead of ! -z. In /usr/bin/keychain line 959: sf_filename="$($realpath_bin $sf_filename)" ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: sf_filename="$($realpath_bin "$sf_filename")" In /usr/bin/keychain line 964: if [ -L "$sf_filename" ] && [ ! -z "$realpath_bin" ]; then ^-- SC2236: Use -n instead of ! -z. In /usr/bin/keychain line 965: sf_filename="$($realpath_bin $sf_filename)" ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: sf_filename="$($realpath_bin "$sf_filename")" In /usr/bin/keychain line 995: set -- $gpgkeys ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: set -- "$gpgkeys" In /usr/bin/keychain line 1031: set -- $sshkeys ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: set -- "$sshkeys" In /usr/bin/keychain line 1093: set -- $mykeys ^-----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: set -- "$mykeys" In /usr/bin/keychain line 1114: if [ $? -eq 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 1143: if command -v ${a}-agent >/dev/null; then ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if command -v "${a}"-agent >/dev/null; then In /usr/bin/keychain line 1151: for a in ssh; do ^-^ SC2043: This loop will only ever run once. Bad quoting or missing glob/expansion? In /usr/bin/keychain line 1170: *"Host "*) h=$(echo $line | awk '{print $2}') ;; ^---^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: *"Host "*) h=$(echo "$line" | awk '{print $2}') ;; In /usr/bin/keychain line 1174: if [ $h = "$1" ]; then ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ "$h" = "$1" ]; then In /usr/bin/keychain line 1175: echo $line | awk '{print $2}' ^---^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: echo "$line" | awk '{print $2}' In /usr/bin/keychain line 1329: warn "~/.ssh/config not found; --confhost/-c option ignored." ^-- SC2088: Tilde does not expand in quotes. Use $HOME. In /usr/bin/keychain line 1381: [ -z "$hostopt" ] && hostopt="${HOSTNAME}" ^---------^ SC2039: In POSIX sh, HOSTNAME is undefined. In /usr/bin/keychain line 1386: olockf="${keydir}/${hostopt}-lock" ^----^ SC2034: olockf appears unused. Verify use (or export if used externally). In /usr/bin/keychain line 1397: . "$envf" ^-----^ SC1090: Can't follow non-constant source. Use a directive to specify location. In /usr/bin/keychain line 1442: if [ "$stopwhich" = mine -o "$stopwhich" = others ]; then ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. In /usr/bin/keychain line 1443: loadagents $agentsopt ^--------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: loadagents "$agentsopt" In /usr/bin/keychain line 1446: stopagent $a ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: stopagent "$a" In /usr/bin/keychain line 1457: loadagents $agentsopt # sets ssh_auth_sock, ssh_agent_pid, etc ^--------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: loadagents "$agentsopt" # sets ssh_auth_sock, ssh_agent_pid, etc In /usr/bin/keychain line 1465: if [ $a = ssh ]; then ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ "$a" = ssh ]; then In /usr/bin/keychain line 1468: if [ $? = 0 -o \( $? = 1 -a -z "$mykeys" \) ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In /usr/bin/keychain line 1472: elif [ $a = gpg ]; then ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: elif [ "$a" = gpg ]; then In /usr/bin/keychain line 1486: catpidf $a ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: catpidf "$a" In /usr/bin/keychain line 1500: ssh_timeout=$(expr $ssh_timeout \* 60) ^--^ SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]]. ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: ssh_timeout=$(expr "$ssh_timeout" \* 60) In /usr/bin/keychain line 1508: loadagents $agentsopt ^--------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: loadagents "$agentsopt" In /usr/bin/keychain line 1512: catpidf_shell sh $a | cut -d\; -f1 ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: catpidf_shell sh "$a" | cut -d\; -f1 In /usr/bin/keychain line 1513: elif startagent $a; then ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: elif startagent "$a"; then In /usr/bin/keychain line 1515: $evalopt && catpidf $a ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: $evalopt && catpidf "$a" In /usr/bin/keychain line 1538: if [ $a = ssh ]; then ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ "$a" = ssh ]; then In /usr/bin/keychain line 1540: if [ $? = 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 1545: elif [ $a = gpg ]; then ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: elif [ "$a" = gpg ]; then In /usr/bin/keychain line 1546: kill -1 $gpg_agent_pid 2>/dev/null ^------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: kill -1 "$gpg_agent_pid" 2>/dev/null In /usr/bin/keychain line 1557: systemctl --user set-environment $( catpidf_shell sh $a | cut -d\; -f1 ) ^-- SC2046: Quote this to prevent word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: systemctl --user set-environment $( catpidf_shell sh "$a" | cut -d\; -f1 ) In /usr/bin/keychain line 1568: eval pkeypath=$pkeypath ^-------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: eval pkeypath="$pkeypath" In /usr/bin/keychain line 1591: mesg "Adding ${CYANN}"$(echo "$sshkeys" | wc -l)"${OFF} ssh key(s): $(echo $sshkeys)" ^------------------------^ SC2027: The surrounding quotes actually unquote this. Remove or escape them. ^------------------------^ SC2046: Quote this to prevent word splitting. ^--------------^ SC2116: Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'. ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: mesg "Adding ${CYANN}"$(echo "$sshkeys" | wc -l)"${OFF} ssh key(s): $(echo "$sshkeys")" In /usr/bin/keychain line 1600: set -- $sshkeys ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: set -- "$sshkeys" In /usr/bin/keychain line 1604: if $noguiopt || [ -z "$SSH_ASKPASS" -o -z "$DISPLAY" ]; then ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. In /usr/bin/keychain line 1607: sshout=$(ssh-add ${ssh_timeout} ${ssh_confirm} "$@" 2>&1) ^------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: sshout=$(ssh-add "${ssh_timeout}" ${ssh_confirm} "$@" 2>&1) In /usr/bin/keychain line 1609: sshout=$(ssh-add ${ssh_timeout} ${ssh_confirm} "$@" 2>&1 </dev/null) ^------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: sshout=$(ssh-add "${ssh_timeout}" ${ssh_confirm} "$@" 2>&1 </dev/null) In /usr/bin/keychain line 1611: if [ $? = 0 ] ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 1618: mesg "ssh-add: Identities added: $(echo $sshkeys)${blurb}" ^--------------^ SC2116: Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'. ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: mesg "ssh-add: Identities added: $(echo "$sshkeys")${blurb}" In /usr/bin/keychain line 1621: if [ $sshattempts = 1 ]; then ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ "$sshattempts" = 1 ]; then In /usr/bin/keychain line 1629: [ $? = 0 ] || die "problem running ssh-add -l" ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 1633: sshattempts=$(expr $sshattempts - 1) ^--^ SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]]. ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: sshattempts=$(expr "$sshattempts" - 1) In /usr/bin/keychain line 1653: mesg "Adding ${BLUE}"$(echo "$gpgkeys" | wc -l)"${OFF} gpg key(s): $(echo $gpgkeys)" ^------------------------^ SC2027: The surrounding quotes actually unquote this. Remove or escape them. ^------------------------^ SC2046: Quote this to prevent word splitting. ^--------------^ SC2116: Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'. ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: mesg "Adding ${BLUE}"$(echo "$gpgkeys" | wc -l)"${OFF} gpg key(s): $(echo "$gpgkeys")" In /usr/bin/keychain line 1662: set -- $gpgkeys ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: set -- "$gpgkeys" In /usr/bin/keychain line 1669: [ $? != 0 ] && tryagain=true ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/keychain line 1673: if [ $gpgattempts = 1 ]; then ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ "$gpgattempts" = 1 ]; then In /usr/bin/keychain line 1683: gpgattempts=$(expr $gpgattempts - 1) ^--^ SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]]. ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: gpgattempts=$(expr "$gpgattempts" - 1) For more information: https://www.shellcheck.net/wiki/SC1090 -- Can't follow non-constant source.... https://www.shellcheck.net/wiki/SC2027 -- The surrounding quotes actually u... https://www.shellcheck.net/wiki/SC2034 -- olockf appears unused. Verify use...