[+] More editor support

This commit is contained in:
Azalea 2023-08-14 21:20:45 -07:00
parent 7491081946
commit e7938ea4c3

View file

@ -2294,9 +2294,15 @@ get_editor() {
# Obtain editor version # Obtain editor version
case ${editor_name:=${editor_full_path##*/}} in case ${editor_name:=${editor_full_path##*/}} in
nano|vim|micro) nano|vim|micro|emacs)
editor_v=$("$editor_full_path" --version 2>&1) editor_v=$("$editor_full_path" --version 2>&1)
;; ;;
kak)
editor_v=$("$editor_full_path" -version 2>&1)
;;
ne)
editor_v=$("$editor_full_path" -h 2>&1)
;;
esac esac
editor_v="${editor_v/$'\n'*}" editor_v="${editor_v/$'\n'*}"
editor_v="${editor_v/Version: }" editor_v="${editor_v/Version: }"