Browse Source

I hate eval. Apart from when it's really needed.

Eval'ing constant expressions is not such a case.
"...fine with me" krw@
OPENBSD_5_6
halex 10 years ago
parent
commit
ebec654dde
1 changed files with 13 additions and 13 deletions
  1. +13
    -13
      src/etc/ksh.kshrc

+ 13
- 13
src/etc/ksh.kshrc View File

@ -1,5 +1,5 @@
:
# $OpenBSD: ksh.kshrc,v 1.16 2011/07/04 19:52:37 halex Exp $
# $OpenBSD: ksh.kshrc,v 1.17 2014/07/09 15:41:16 halex Exp $
#
# NAME:
# ksh.kshrc - global initialization for ksh
@ -98,15 +98,15 @@ case "$-" in
alias stripe='label "$USER@$HOST ($tty) - $PWD"'
alias istripe='ilabel "$USER@$HOST ($tty)"'
function wftp { ilabel "ftp $*"; "ftp" "$@"; eval istripe; }
function wcd { \cd "$@" && eval stripe; }
function wftp { ilabel "ftp $*"; "ftp" "$@"; istripe; }
function wcd { \cd "$@" && stripe; }
function wssh
{
local rc
"ssh" "$@"
rc=$?
eval istripe
eval stripe
istripe
stripe
return $rc
}
function wtelnet
@ -114,8 +114,8 @@ case "$-" in
local rc
"telnet" "$@"
rc=$?
eval istripe
eval stripe
istripe
stripe
return $rc
}
function wrlogin
@ -123,8 +123,8 @@ case "$-" in
local rc
"rlogin" "$@"
rc=$?
eval istripe
eval stripe
istripe
stripe
return $rc
}
function wsu
@ -132,8 +132,8 @@ case "$-" in
local rc
"su" "$@"
rc=$?
eval istripe
eval stripe
istripe
stripe
return $rc
}
alias su=wsu
@ -142,8 +142,8 @@ case "$-" in
alias ssh=wssh
alias telnet=wtelnet
alias rlogin=wrlogin
eval stripe
eval istripe
stripe
istripe
PS1=$PROMPT
fi
alias quit=exit


Loading…
Cancel
Save