In /usr/bin/select-editor line 14:
touch $HOME/.selected_editor || exit 1
      ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
touch "$HOME"/.selected_editor || exit 1


In /usr/bin/select-editor line 17:
               update-alternatives --query editor | while read emptyline; do
                                                          ^--^ SC2162: read without -r will mangle backslashes.


In /usr/bin/select-editor line 22:
                       local ALTERNATIVE=''
                       ^---------------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/select-editor line 23:
                       local PRIORITY=''
                       ^------------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/select-editor line 24:
                       while read field value; do
                             ^--^ SC2162: read without -r will mangle backslashes.


In /usr/bin/select-editor line 38:
editors=`update-alternatives --list editor | wc -l`
        ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
editors=$(update-alternatives --list editor | wc -l)


In /usr/bin/select-editor line 39:
if [ $editors -gt 1 ]; then
     ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$editors" -gt 1 ]; then


In /usr/bin/select-editor line 43:
	echo "`gettext 'Select an editor.  To change later, run'`" "'select-editor'."
              ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	echo "$(gettext 'Select an editor.  To change later, run')" "'select-editor'."


In /usr/bin/select-editor line 45:
	editors=`sorted_list_of_editors`
                ^----------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	editors=$(sorted_list_of_editors)


In /usr/bin/select-editor line 47:
		i=`expr $i + 1`
                  ^-----------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                   ^--^ SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].

Did you mean: 
		i=$(expr $i + 1)


In /usr/bin/select-editor line 49:
		if [ $e = "$EASIEST" ]; then
                     ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		if [ "$e" = "$EASIEST" ]; then


In /usr/bin/select-editor line 50:
			desc="        <---- ` gettext 'easiest'`"
                                            ^------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
			desc="        <---- $( gettext 'easiest')"


In /usr/bin/select-editor line 58:
		if [ -z "$selected" -a ! -z "$simple" ]; then
                                    ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
                                       ^-- SC2236: Use -n instead of ! -z.


In /usr/bin/select-editor line 60:
		elif ! test $selected -gt 0 2>/dev/null; then
                            ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		elif ! test "$selected" -gt 0 2>/dev/null; then


In /usr/bin/select-editor line 61:
			echo -n "$(gettext 'Choose') 1-$i [$simple]: "
                             ^-- SC2039: In POSIX sh, echo flags are undefined.


In /usr/bin/select-editor line 63:
		elif ! test $selected -le $i 2>/dev/null; then
                            ^-------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		elif ! test "$selected" -le "$i" 2>/dev/null; then


In /usr/bin/select-editor line 64:
			echo -n "$(gettext 'Choose') 1-$i [$simple]: "
                             ^-- SC2039: In POSIX sh, echo flags are undefined.


In /usr/bin/select-editor line 72:
		i=`expr $i + 1`
                  ^-----------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                   ^--^ SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].

Did you mean: 
		i=$(expr $i + 1)


In /usr/bin/select-editor line 73:
		if [ $i -eq $selected ]; then
                     ^-- SC2086: Double quote to prevent globbing and word splitting.
                            ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		if [ "$i" -eq "$selected" ]; then


In /usr/bin/select-editor line 74:
			echo "# Generated by /usr/bin/select-editor" > $HOME/.selected_editor
                                                                       ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
			echo "# Generated by /usr/bin/select-editor" > "$HOME"/.selected_editor


In /usr/bin/select-editor line 75:
			echo "SELECTED_EDITOR=\"$e\"" >> $HOME/.selected_editor && exit 0
                                                         ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
			echo "SELECTED_EDITOR=\"$e\"" >> "$HOME"/.selected_editor && exit 0

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, 'local' is undefined.
  https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] && [ q ] as [ p -a q...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...