diff --git a/dot.mkshrc b/dot.mkshrc index 4c64395..26d51d7 100644 --- a/dot.mkshrc +++ b/dot.mkshrc @@ -1,9 +1,9 @@ # $Id$ -# $MirOS: src/bin/mksh/dot.mkshrc,v 1.100 2015/07/10 19:36:33 tg Exp $ +# $MirOS: src/bin/mksh/dot.mkshrc,v 1.101 2015/07/18 23:03:24 tg Exp $ #- # Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, # 2011, 2012, 2013, 2014, 2015 -# Thorsten Glaser +# mirabilos # # Provided that these terms and disclaimer and all copyright notices # are retained or reproduced in an accompanying document, permission @@ -384,7 +384,11 @@ function Lstripcom { # give MidnightBSD's laffer1 a bit of csh feeling function setenv { - \eval "'export' \"$1\""'="$2"' + if (( $# )); then + \eval '\export "$1"="${2:-}"' + else + \typeset -x + fi } # toggle built-in aliases and utilities, and aliases and functions from mkshrc