summaryrefslogtreecommitdiff
path: root/etc/ksh.kshrc
diff options
context:
space:
mode:
authorRobert Peichaer <rpe@cvs.openbsd.org>2016-09-14 18:34:52 +0000
committerRobert Peichaer <rpe@cvs.openbsd.org>2016-09-14 18:34:52 +0000
commitbf66f6c0c37f880363717634f7bb126359104152 (patch)
tree532f37cf1927edeff3229f371de27343ab7a203e /etc/ksh.kshrc
parent8c70d9a1623f70993dc12378d502f09bdb17bf79 (diff)
Do the same with less code.
OK halex
Diffstat (limited to 'etc/ksh.kshrc')
-rw-r--r--etc/ksh.kshrc10
1 files changed, 4 insertions, 6 deletions
diff --git a/etc/ksh.kshrc b/etc/ksh.kshrc
index 7de34f900ce..1222d5d0aa6 100644
--- a/etc/ksh.kshrc
+++ b/etc/ksh.kshrc
@@ -1,5 +1,5 @@
:
-# $OpenBSD: ksh.kshrc,v 1.26 2016/09/10 12:50:20 rpe Exp $
+# $OpenBSD: ksh.kshrc,v 1.27 2016/09/14 18:34:51 rpe Exp $
#
# NAME:
# ksh.kshrc - global initialization for ksh
@@ -74,11 +74,9 @@ case "$-" in
xterm*)
ILS='\033]1;'; ILE='\007'
WLS='\033]2;'; WLE='\007'
- parent="`ps -ax 2>/dev/null | grep $PPID | grep -v grep`"
- case "$parent" in
- *telnet*)
- export TERM=xterms;;
- esac
+ if ps -p $PPID -o command | grep -q telnet; then
+ export TERM=xterms
+ fi
;;
*) ;;
esac