Skip to content

Commit

Permalink
CD at end of script by starting a new subprocess
Browse files Browse the repository at this point in the history
If $SHELL var is set, created new sub process with login shell and
outputs appropriate message. If $SHELL is not set, output existing
message.
  • Loading branch information
quickliketurtle committed Feb 23, 2017
1 parent 5fbc485 commit f1cc960
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions lambo
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,21 @@ case $PROJECTPATH in
*) prettyPath="$PROJECTPATH/$PROJECTNAME" ;;
esac

echo "
if [[ "$SHELL" != "" ]]; then
exec "$SHELL"

***********************************************
echo "
You're ready to go! Remember to cd into '${green}$prettyPath${reset}' before you start editing."
***********************************************
You're ready to go!"
else
echo "
***********************************************
You're ready to go! Remember to cd into '${green}$prettyPath${reset}' before you start editing."
fi

# End script; disable error handling
trap : 0

0 comments on commit f1cc960

Please sign in to comment.