In /usr/bin/xdg-email line 169:
  [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
    ^----------------------^ SC2086: Double quote to prevent globbing and word splitting.
                                 ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
  [ "${XDG_UTILS_DEBUG_LEVEL}" -lt "$1" ] && return 0;


In /usr/bin/xdg-email line 177:
    read first rest
    ^--^ SC2162: read without -r will mangle backslashes.


In /usr/bin/xdg-email line 186:
    binary="`which "$1"`"
            ^----------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    binary="$(which "$1")"


In /usr/bin/xdg-email line 187:
    binary="`readlink -f "$binary"`"
            ^---------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    binary="$(readlink -f "$binary")"


In /usr/bin/xdg-email line 188:
    base="`basename "$binary"`"
          ^------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    base="$(basename "$binary")"


In /usr/bin/xdg-email line 200:
            command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
                     ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
            command="$(grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word)"


In /usr/bin/xdg-email line 201:
            command="`which "$command"`"
                     ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
            command="$(which "$command")"


In /usr/bin/xdg-email line 202:
            if [ x"`readlink -f "$command"`" = x"$binary" ]; then
                   ^----------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
            if [ x"$(readlink -f "$command")" = x"$binary" ]; then


In /usr/bin/xdg-email line 216:
    desktop="`basename "$1"`"
             ^-------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    desktop="$(basename "$1")"


In /usr/bin/xdg-email line 225:
            if [ -r $dir/applications/$vendor/$app ]; then
                    ^--^ SC2086: Double quote to prevent globbing and word splitting.
                                      ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                              ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
            if [ -r "$dir"/applications/"$vendor"/"$app" ]; then


In /usr/bin/xdg-email line 227:
            elif [ -r $dir/applnk/$vendor/$app ]; then
                      ^--^ SC2086: Double quote to prevent globbing and word splitting.
                                  ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
            elif [ -r "$dir"/applnk/"$vendor"/"$app" ]; then


In /usr/bin/xdg-email line 242:
            command="`grep -E "^Exec(\[[^]=]*])?=" "$file_path" | cut -d= -f 2- | first_word`"
                     ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
            command="$(grep -E "^Exec(\[[^]=]*])?=" "$file_path" | cut -d= -f 2- | first_word)"


In /usr/bin/xdg-email line 243:
            command="`which "$command"`"
                     ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
            command="$(which "$command")"


In /usr/bin/xdg-email line 253:
exit_success()
^-- SC2120: exit_success references arguments, but none are ever passed.


In /usr/bin/xdg-email line 272:
        echo "xdg-email: $@" >&2
                         ^-- SC2145: Argument mixes string and array. Use * or separate argument.


In /usr/bin/xdg-email line 288:
        echo "xdg-email: $@" >&2
                         ^-- SC2145: Argument mixes string and array. Use * or separate argument.


In /usr/bin/xdg-email line 300:
        echo "xdg-email: $@" >&2
                         ^-- SC2145: Argument mixes string and array. Use * or separate argument.


In /usr/bin/xdg-email line 309:
exit_failure_operation_failed()
^-- SC2120: exit_failure_operation_failed references arguments, but none are ever passed.


In /usr/bin/xdg-email line 312:
        echo "xdg-email: $@" >&2
                         ^-- SC2145: Argument mixes string and array. Use * or separate argument.


In /usr/bin/xdg-email line 324:
        echo "xdg-email: $@" >&2
                         ^-- SC2145: Argument mixes string and array. Use * or separate argument.


In /usr/bin/xdg-email line 336:
        echo "xdg-email: $@" >&2
                         ^-- SC2145: Argument mixes string and array. Use * or separate argument.


In /usr/bin/xdg-email line 356:
    file=`basename "$1"`
         ^-------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    file=$(basename "$1")


In /usr/bin/xdg-email line 379:
        DIR=`dirname "$1"`
            ^------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
        DIR=$(dirname "$1")


In /usr/bin/xdg-email line 399:
            exit_success
            ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 404:
            exit_success
            ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 409:
            exit_success
            ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 418:
if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
     ^------------------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "${XDG_UTILS_DEBUG_LEVEL-0}" -lt 1 ]; then


In /usr/bin/xdg-email line 423:
    xdg_redirect_output=" >&2"
    ^-----------------^ SC2034: xdg_redirect_output appears unused. Verify use (or export if used externally).


In /usr/bin/xdg-email line 477:
      elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
           ^-- SC2092: Remove backticks to avoid executing output.
           ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
      elif $(dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1) ; then DE=gnome;


In /usr/bin/xdg-email line 480:
      elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment;
                ^------^ SC2153: Possible misspelling: DESKTOP may not be assigned, but desktop is.
                ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
      elif echo "$DESKTOP" | grep -q '^Enlightenment'; then DE=enlightenment;


In /usr/bin/xdg-email line 533:
    version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'`
            ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    version=$(LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE')


In /usr/bin/xdg-email line 534:
    major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
          ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    major=$(echo "$version" | sed 's/KDE.*: \([0-9]\).*/\1/')


In /usr/bin/xdg-email line 535:
    minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
          ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    minor=$(echo "$version" | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/')


In /usr/bin/xdg-email line 536:
    release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
            ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                  ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    release=$(echo "$version" | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/')


In /usr/bin/xdg-email line 537:
    test "$major" -gt 3 && return $1
                                  ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    test "$major" -gt 3 && return "$1"


In /usr/bin/xdg-email line 538:
    test "$minor" -gt 5 && return $1
                                  ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    test "$minor" -gt 5 && return "$1"


In /usr/bin/xdg-email line 539:
    test "$release" -gt 4 && return $1
                                    ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    test "$release" -gt 4 && return "$1"


In /usr/bin/xdg-email line 557:
    local THUNDERBIRD MAILTO NEWMAILTO TO CC BCC SUBJECT BODY ATTACH
    ^-- SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-email line 561:
    if [ "$?" = "0" ] ; then
         ^--^ SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/xdg-email line 568:
    TO=$(/bin/echo -e $(echo "$MAILTO" | grep '^to=' | sed 's/^to=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }'))
                   ^-- SC2039: In POSIX sh, echo flags are undefined.
                      ^-- SC2046: Quote this to prevent word splitting.


In /usr/bin/xdg-email line 569:
    CC=$(/bin/echo -e $(echo "$MAILTO" | grep '^cc=' | sed 's/^cc=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }'))
                   ^-- SC2039: In POSIX sh, echo flags are undefined.
                      ^-- SC2046: Quote this to prevent word splitting.


In /usr/bin/xdg-email line 570:
    BCC=$(/bin/echo -e $(echo "$MAILTO" | grep '^bcc=' | sed 's/^bcc=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }'))
                    ^-- SC2039: In POSIX sh, echo flags are undefined.
                       ^-- SC2046: Quote this to prevent word splitting.


In /usr/bin/xdg-email line 573:
    ATTACH=$(/bin/echo -e $(echo "$MAILTO" | grep '^attach=' | sed 's/^attach=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }' | sed 's/,$//'))
                       ^-- SC2039: In POSIX sh, echo flags are undefined.
                          ^-- SC2046: Quote this to prevent word splitting.


In /usr/bin/xdg-email line 600:
    if [ $? -eq 0 ]; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/xdg-email line 601:
        exit_success
        ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 603:
        exit_failure_operation_failed
        ^---------------------------^ SC2119: Use exit_failure_operation_failed "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 610:
        local kreadconfig=kreadconfig$KDE_SESSION_VERSION
        ^---------------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-email line 612:
        local kreadconfig=kreadconfig
        ^---------------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-email line 616:
        local profile="$($kreadconfig --file emaildefaults \
        ^-----------^ SC2039: In POSIX sh, 'local' is undefined.
              ^-----^ SC2155: Declare and assign separately to avoid masking return values.


In /usr/bin/xdg-email line 619:
            local client="$($kreadconfig --file emaildefaults \
            ^----------^ SC2039: In POSIX sh, 'local' is undefined.
                  ^----^ SC2155: Declare and assign separately to avoid masking return values.


In /usr/bin/xdg-email line 630:
    local command
    ^-----------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-email line 637:
    if which $command >/dev/null 2>&1; then
             ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    if which "$command" >/dev/null 2>&1; then


In /usr/bin/xdg-email line 651:
    if [ $? = 0 ]; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/xdg-email line 652:
        exit_success
        ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 654:
        exit_failure_operation_failed
        ^---------------------------^ SC2119: Use exit_failure_operation_failed "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 660:
    local client
    ^----------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-email line 661:
    local desktop
    ^-----------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-email line 662:
    desktop=`xdg-mime query default "x-scheme-handler/mailto"`
            ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    desktop=$(xdg-mime query default "x-scheme-handler/mailto")


In /usr/bin/xdg-email line 663:
    client=`desktop_file_to_binary "$desktop"`
           ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    client=$(desktop_file_to_binary "$desktop")


In /usr/bin/xdg-email line 664:
    echo $client | grep -E 'thunderbird|icedove' > /dev/null 2>&1
         ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    echo "$client" | grep -E 'thunderbird|icedove' > /dev/null 2>&1


In /usr/bin/xdg-email line 665:
    if [ $? -eq 0 ] ; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/xdg-email line 680:
    if [ $? -eq 0 ]; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/xdg-email line 681:
        exit_success
        ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 683:
        exit_failure_operation_failed
        ^---------------------------^ SC2119: Use exit_failure_operation_failed "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 689:
    local client
    ^----------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-email line 690:
    client=`gconftool-2 --get /desktop/gnome/url-handlers/mailto/command | cut -d ' ' -f 1` || ""
           ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    client=$(gconftool-2 --get /desktop/gnome/url-handlers/mailto/command | cut -d ' ' -f 1) || ""


In /usr/bin/xdg-email line 691:
    echo $client | grep -E 'thunderbird|icedove' > /dev/null 2>&1
         ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    echo "$client" | grep -E 'thunderbird|icedove' > /dev/null 2>&1


In /usr/bin/xdg-email line 692:
    if [ $? -eq 0 ] ; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/xdg-email line 707:
    if [ $? -eq 0 ]; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/xdg-email line 708:
        exit_success
        ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 710:
        exit_failure_operation_failed
        ^---------------------------^ SC2119: Use exit_failure_operation_failed "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 720:
    if [ $? -eq 0 ]; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/xdg-email line 721:
        exit_success
        ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 723:
        exit_failure_operation_failed
        ^---------------------------^ SC2119: Use exit_failure_operation_failed "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 729:
    local OLDIFS="$IFS"
    ^----------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-email line 736:
	if [ $? -eq 0 ]; then
             ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/xdg-email line 737:
	    exit_success
            ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 741:
    exit_failure_operation_failed
    ^---------------------------^ SC2119: Use exit_failure_operation_failed "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 752:
    if [ $? -eq 0 ]; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/xdg-email line 753:
        exit_success
        ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 755:
        exit_failure_operation_failed
        ^---------------------------^ SC2119: Use exit_failure_operation_failed "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 761:
    local client
    ^----------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-email line 762:
    local desktop
    ^-----------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-email line 763:
    desktop=`xdg-mime query default "x-scheme-handler/mailto"`
            ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    desktop=$(xdg-mime query default "x-scheme-handler/mailto")


In /usr/bin/xdg-email line 764:
    client=`desktop_file_to_binary "$desktop"`
           ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    client=$(desktop_file_to_binary "$desktop")


In /usr/bin/xdg-email line 765:
    echo $client | grep -E 'thunderbird|icedove' > /dev/null 2>&1
         ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    echo "$client" | grep -E 'thunderbird|icedove' > /dev/null 2>&1


In /usr/bin/xdg-email line 766:
    if [ $? -eq 0 ] ; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/xdg-email line 771:
    local ret=$?
    ^-------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-email line 782:
            browser_with_arg=`printf "$browser" "$1" 2>/dev/null`
                             ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                                     ^--------^ SC2059: Don't use variables in the printf format string. Use printf '..%s..' "$foo".

Did you mean: 
            browser_with_arg=$(printf "$browser" "$1" 2>/dev/null)


In /usr/bin/xdg-email line 783:
            if [ $? -ne 0 ]; then browser_with_arg=$browser;
                 ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/xdg-email line 790:
            if [ $? -eq 0 ]; then exit_success;
                 ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
                                  ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 804:
local ORIG_LANG="$LANG"
^-------------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-email line 805:
local ORIG_LC_ALL="$LC_ALL"
^---------------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-email line 899:
        file=`readlink -f "$1"` # Normalize path
             ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
        file=$(readlink -f "$1") # Normalize path


In /usr/bin/xdg-email line 920:
            mailto="mailto:"${result}"?"
                            ^-------^ SC2027: The surrounding quotes actually unquote this. Remove or escape them.


In /usr/bin/xdg-email line 952:
mailto=`echo "${mailto}"| sed 's/[?&]$//'`
       ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
mailto=$(echo "${mailto}"| sed 's/[?&]$//')


In /usr/bin/xdg-email line 959:
    if [ $? -eq 0 ]; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/xdg-email line 960:
        exit_success
        ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 962:
        exit_failure_operation_failed
        ^---------------------------^ SC2119: Use exit_failure_operation_failed "$@" if function's $1 should mean script's $1.


In /usr/bin/xdg-email line 1006:
    open_flatpak "$url"
                  ^--^ SC2154: url is referenced but not assigned.

For more information:
  https://www.shellcheck.net/wiki/SC2145 -- Argument mixes string and array. ...
  https://www.shellcheck.net/wiki/SC2027 -- The surrounding quotes actually u...
  https://www.shellcheck.net/wiki/SC2034 -- xdg_redirect_output appears unuse...