#!/bin/sh

OLDPATH="$PATH"
OLDTZ="$TZ"
source @myenvpath@

PATH="$PATH:$OLDPATH"
export PS1="\n@name@:[\u@\h:\w]\$ "
export NIX_MYENV_NAME="@name@"
export buildInputs
export NIX_STRIP_DEBUG=0
export TZ="$OLDTZ"

if test $# -gt 0; then
    exec "$@"
else
    exec @shell@
fi


#!/bin/sh

OLDPATH="$PATH"
OLDTZ="$TZ"
source @myenvpath@

PATH="$PATH:$OLDPATH"
export PS1="\n@name@:[\u@\h:\w]\$ "
export NIX_MYENV_NAME="@name@"
export buildInputs
export NIX_STRIP_DEBUG=0
export TZ="$OLDTZ"

@shell@


--- 
+++ 
@@ -11,5 +11,9 @@
 export NIX_STRIP_DEBUG=0
 export TZ="$OLDTZ"
 
-@shell@
+if test $# -gt 0; then
+    exec "$@"
+else
+    exec @shell@
+fi
 
my-env: Support for running command directly by load-env-xxx script

First I don't think there is a reason to run shell as a child of
load-env-xxx script and not to just exec into it.

Also it's often useful to just run a command inside the environment
load-env-xxx command --args

Closes #3254
