oh wait, actually…

• besides the previously-set $EDITOR take [jupp jstar mcedit ed vi]
  as sorted list, first one found wins
• set -eu safe, and in the lksh part
This commit is contained in:
tg 2017-08-08 21:10:21 +00:00
parent b00e5b01b4
commit b52badd958
1 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,5 @@
# $Id$
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.120 2017/08/08 20:52:11 tg Exp $
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.121 2017/08/08 21:10:21 tg Exp $
#-
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012, 2013, 2014, 2015, 2016, 2017
@ -56,6 +56,13 @@ smores() (
done
)
# customise your favourite editor here; the first one found is used
for EDITOR in "${EDITOR:-}" jupp jstar mcedit ed vi; do
EDITOR=$(\\builtin whence -p "$EDITOR") || EDITOR=
[[ -n $EDITOR && -x $EDITOR ]] && break
EDITOR=
done
\\builtin alias ls=ls l='ls -F' la='l -a' ll='l -l' lo='l -alo'
\: "${HOSTNAME:=$(\\builtin ulimit -c 0; \\builtin print -r -- $(hostname \
2>/dev/null))}${EDITOR:=/bin/ed}${TERM:=vt100}${USER:=$(\\builtin ulimit \
@ -617,7 +624,6 @@ done
#\\builtin export LANG=C LC_CTYPE=$p LC_MEASUREMENT=$p LC_MESSAGES=$p LC_PAPER=$p
#\\builtin set -U
p=$(\\builtin whence -p jupp) && EDITOR=$p
\\builtin unset p
\: place customisations above this line