From c3b93834b057bed41a2b3276abc781c28a704cd5 Mon Sep 17 00:00:00 2001 From: tg Date: Sat, 27 Apr 2013 18:19:44 +0000 Subject: [PATCH] =?UTF-8?q?lksh=20also=20reads=20$ENV=20so=20make=20sure?= =?UTF-8?q?=20it=20doesn=E2=80=99t=20try=20this=20one?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dot.mkshrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dot.mkshrc b/dot.mkshrc index bd2c3ff..f83b42d 100644 --- a/dot.mkshrc +++ b/dot.mkshrc @@ -1,5 +1,5 @@ # $Id$ -# $MirOS: src/bin/mksh/dot.mkshrc,v 1.79 2013/04/05 15:39:52 tg Exp $ +# $MirOS: src/bin/mksh/dot.mkshrc,v 1.80 2013/04/27 18:19:44 tg Exp $ #- # Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, # 2011, 2012, 2013 @@ -22,6 +22,12 @@ #- # ${ENV:-~/.mkshrc}: mksh initialisation file for interactive shells +# catch non-mksh (including lksh) trying to shell this file +case $KSH_VERSION in +*MIRBSD\ KSH*) ;; +*) return 0 ;; +esac + PS1='#'; (( USER_ID )) && PS1='$'; [[ ${HOSTNAME:=$(ulimit -c 0; hostname -s \ 2>/dev/null)} = *([ ]|localhost) ]] && HOSTNAME=$(ulimit -c 0; hostname \ 2>/dev/null); : ${EDITOR:=/bin/ed} ${HOSTNAME:=nil} ${TERM:=vt100}