mirror of
https://git.coolaj86.com/coolaj86/telebit.js.git
synced 2025-04-21 19:40:37 +00:00
use only editor basename, not full path
This commit is contained in:
parent
ae992c0bd1
commit
cb6d7497f8
@ -52,17 +52,19 @@ read_cmd="read -u 3"
|
|||||||
# TODO detect if rsync is available and use rsync -a (more portable)
|
# TODO detect if rsync is available and use rsync -a (more portable)
|
||||||
rsync_cmd="cp -pPR"
|
rsync_cmd="cp -pPR"
|
||||||
|
|
||||||
my_edit=${EDITOR:-}
|
|
||||||
set +e
|
set +e
|
||||||
my_edit=$(type -p edit)
|
my_edit=$(basename "${EDITOR:-}")
|
||||||
if [ -z "$my_edit" ]; then
|
if [ -z "$my_edit" ]; then
|
||||||
my_edit=$(type -p nano)
|
my_edit=$(basename "$(type -p edit)")
|
||||||
fi
|
fi
|
||||||
if [ -z "$my_edit" ]; then
|
if [ -z "$my_edit" ]; then
|
||||||
my_edit=$(type -p vim)
|
my_edit=$(basename "$(type -p nano)")
|
||||||
fi
|
fi
|
||||||
if [ -z "$my_edit" ]; then
|
if [ -z "$my_edit" ]; then
|
||||||
my_edit=$(type -p vi)
|
my_edit=$(basename "$(type -p vim)")
|
||||||
|
fi
|
||||||
|
if [ -z "$my_edit" ]; then
|
||||||
|
my_edit=$(basename "$(type -p vi)")
|
||||||
fi
|
fi
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user