Try to change to directory from which become was run.
authorIain Patterson <me@iain.cx>
Wed, 21 Apr 2010 13:27:04 +0000 (14:27 +0100)
committerIain Patterson <me@iain.cx>
Fri, 23 Apr 2010 13:59:29 +0000 (14:59 +0100)
opt/bin/become

index b6b2f20..26298cb 100755 (executable)
@@ -69,6 +69,7 @@ fi
 echo >&3 ". $HOME/.bash_profile"
 [ -f "$BECOME/all" ] && cat >&3 2>/dev/null "$BECOME/all"
 [ -f "$BECOME/$user" ] && cat >&3 2>/dev/null "$BECOME/$user"
+echo >&3 2>/dev/null "cd - &>/dev/null"
 
 exec 3>&-
 dir=$(dirname "$0")