In /usr/bin/xdg-open line 123:
  [ ${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-open line 131:
    read first rest
    ^--^ SC2162: read without -r will mangle backslashes.


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

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


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

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


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

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


In /usr/bin/xdg-open line 154:
            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-open line 155:
            command="`which "$command"`"
                     ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

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


In /usr/bin/xdg-open line 156:
            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-open line 170:
    desktop="`basename "$1"`"
             ^-------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

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


In /usr/bin/xdg-open line 179:
            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-open line 181:
            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-open line 196:
            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-open line 197:
            command="`which "$command"`"
                     ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

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


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


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


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


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


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


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


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


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


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

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


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

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


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


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


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


In /usr/bin/xdg-open line 372:
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-open line 377:
    xdg_redirect_output=" >&2"
    ^-----------------^ SC2034: xdg_redirect_output appears unused. Verify use (or export if used externally).


In /usr/bin/xdg-open line 431:
      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-open line 434:
      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-open line 487:
    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-open line 488:
    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-open line 489:
    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-open line 490:
    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-open line 491:
    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-open line 492:
    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-open line 493:
    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-open line 512:
    read first rest
    ^--^ SC2162: read without -r will mangle backslashes.


In /usr/bin/xdg-open line 521:
    local file="${1}"
    ^--------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-open line 522:
    local key="${2}"
    ^-------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-open line 523:
    local desktop_entry=""
    ^-----------------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-open line 527:
    while read line
          ^--^ SC2162: read without -r will mangle backslashes.


In /usr/bin/xdg-open line 552:
            || ! echo "$1" | egrep -q '^[[:alpha:]+\.\-]+:'; then
                             ^---^ SC2196: egrep is non-standard and deprecated. Use grep -E instead.


In /usr/bin/xdg-open line 563:
    local file="$1"
    ^--------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-open line 568:
        local printf=printf
        ^----------^ SC2039: In POSIX sh, 'local' is undefined.


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


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


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


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


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


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


In /usr/bin/xdg-open line 607:
          kde-open${KDE_SESSION_VERSION} "$1"
                  ^--------------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
          kde-open"${KDE_SESSION_VERSION}" "$1"


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


In /usr/bin/xdg-open line 746:
    local default="$1"
    ^-----------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-open line 747:
    local dir="$2"
    ^-------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-open line 748:
    local target="$3"
    ^----------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-open line 750:
    local file=""
    ^--------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-open line 754:
    elif [ -r "$dir/`echo $default | sed -e 's|-|/|'`" ]; then
                    ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                          ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    elif [ -r "$dir/$(echo "$default" | sed -e 's|-|/|')" ]; then


In /usr/bin/xdg-open line 755:
      file="$dir/`echo $default | sed -e 's|-|/|'`"
                 ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                       ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
      file="$dir/$(echo "$default" | sed -e 's|-|/|')"


In /usr/bin/xdg-open line 760:
        command_exec=`which $command 2>/dev/null`
                     ^--------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                            ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        command_exec=$(which "$command" 2>/dev/null)


In /usr/bin/xdg-open line 765:
        set -- $(get_key "${file}" "Exec" | last_word)
               ^-- SC2046: Quote this to prevent word splitting.


In /usr/bin/xdg-open line 770:
        local args=$#
        ^--------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-open line 771:
        local replaced=0
        ^------------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-open line 797:
            args=$(( $args - 1 ))
                     ^---^ SC2004: $/${} is unnecessary on arithmetic variables.


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


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


In /usr/bin/xdg-open line 816:
    default=`xdg-mime query default "$filetype"`
            ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    default=$(xdg-mime query default "$filetype")


In /usr/bin/xdg-open line 825:
        for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do
                 ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
        for x in $(echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'); do


In /usr/bin/xdg-open line 833:
    filetype=`xdg-mime query filetype "$1" | sed "s/;.*//"`
             ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    filetype=$(xdg-mime query filetype "$1" | sed "s/;.*//")


In /usr/bin/xdg-open line 839:
    scheme="`echo $1 | sed -n 's/\(^[[:alnum:]+\.-]*\):.*$/\1/p'`"
            ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                  ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    scheme="$(echo "$1" | sed -n 's/\(^[[:alnum:]+\.-]*\):.*$/\1/p')"


In /usr/bin/xdg-open line 840:
    if [ -n $scheme ]; then
            ^-----^ SC2070: -n doesn't work with unquoted arguments. Quote or use [[ ]].
            ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    if [ -n "$scheme" ]; then


In /usr/bin/xdg-open line 848:
    local url="$1"
    ^-------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-open line 849:
    local oldifs="$IFS"
    ^----------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/xdg-open line 850:
    local browser browser_with_arg
    ^----------------------------^ SC2039: In POSIX sh, 'local' is undefined.
                  ^--------------^ SC2034: browser_with_arg appears unused. Verify use (or export if used externally).


In /usr/bin/xdg-open line 865:
                set -- "$@" "$(printf -- "$arg" "$url")"
                                         ^----^ SC2059: Don't use variables in the printf format string. Use printf '..%s..' "$foo".


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


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


In /usr/bin/xdg-open line 881:
        local file="$(file_url_to_path "$1")"
        ^--------^ SC2039: In POSIX sh, 'local' is undefined.
              ^--^ SC2155: Declare and assign separately to avoid masking return values.


In /usr/bin/xdg-open line 886:
            filetype=`xdg-mime query filetype "$file" | sed "s/;.*//"`
                     ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
            filetype=$(xdg-mime query filetype "$file" | sed "s/;.*//")


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


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


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


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


In /usr/bin/xdg-open line 931:
        local file="$(file_url_to_path "$1")"
        ^--------^ SC2039: In POSIX sh, 'local' is undefined.
              ^--^ SC2155: Declare and assign separately to avoid masking return values.


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


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


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

For more information:
  https://www.shellcheck.net/wiki/SC2070 -- -n doesn't work with unquoted arg...
  https://www.shellcheck.net/wiki/SC2145 -- Argument mixes string and array. ...
  https://www.shellcheck.net/wiki/SC2034 -- browser_with_arg appears unused. ...