diff options
author | 2017-11-02 10:19:06 +0000 | |
---|---|---|
committer | 2017-11-02 10:19:06 +0000 | |
commit | b6f22de5a9ef8a19da34a43f7e1e586a0f4a6279 (patch) | |
tree | 4559c3ab8bd7cfb59bfb771ff685a7ad76a30381 | |
parent | Kill bogus use of LC_TIME (diff) | |
download | wireguard-openbsd-b6f22de5a9ef8a19da34a43f7e1e586a0f4a6279.tar.xz wireguard-openbsd-b6f22de5a9ef8a19da34a43f7e1e586a0f4a6279.zip |
Replace ps | grep with pgrep and use && instead of if-then-fi.
From Raf Czlonka.
ok halex
-rw-r--r-- | etc/ksh.kshrc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/etc/ksh.kshrc b/etc/ksh.kshrc index e3dcd0e5bf4..05cceb5135a 100644 --- a/etc/ksh.kshrc +++ b/etc/ksh.kshrc @@ -1,5 +1,5 @@ : -# $OpenBSD: ksh.kshrc,v 1.28 2017/07/15 07:11:42 tb Exp $ +# $OpenBSD: ksh.kshrc,v 1.29 2017/11/02 10:19:06 tb Exp $ # # NAME: # ksh.kshrc - global initialization for ksh @@ -74,9 +74,7 @@ case "$-" in xterm*) ILS='\033]1;'; ILE='\007' WLS='\033]2;'; WLE='\007' - if ps -p $PPID -o command | grep -q telnet; then - export TERM=xterms - fi + pgrep -qxs $PPID telnet && export TERM=xterms ;; *) ;; esac |