Hi Mariah, On Sat, Sep 26, 2009 at 6:04 AM, Mariah Lenox <mariah.le...@gmail.com> wrote: > > The open trac tickets #4644 and #5507 discuss > problems with "sage -sh", specifically > > #4644 - No new prompt when doing a ./sage -sh
I can confirm that your patch fixes this issue: {{{ [mv...@sage sage-4.1.1]$ ./sage -sh Starting subshell with Sage environment variables set. Be sure to exit when you are done and do not do anything with other copies of Sage! Bypassing shell configuration files ... sage$ exit exit Exited Sage subshell. }}} > #5507 - $ sage -sh -c "echo hi there" # does not work, but should It also fixes this one as well: {{{ [mv...@sage sage-4.1.1]$ ./sage -sh -c "echo hi there" Starting subshell with Sage environment variables set. Be sure to exit when you are done and do not do anything with other copies of Sage! Bypassing shell configuration files ... hi there Exited Sage subshell. }}} > $ sage -sh -c -c "echo hi there" # works, but shouldn't This one still works: {{{ [mv...@sage sage-4.1.1]$ ./sage -sh -c -c "echo hi there" Starting subshell with Sage environment variables set. Be sure to exit when you are done and do not do anything with other copies of Sage! Bypassing shell configuration files ... hi there Exited Sage subshell. }}} > There is also a problem that "sage -sh" may pick up the user's > $PATH rather than the one defined in sage-env (which > is how I got into this issue). With the patch, the user's $PATH is picked up, but variables in sage-env are prepended to it: {{{ [mv...@sage sage-4.1.1]$ echo $PATH /home/mvngu/usr:/home/mvngu/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games [mv...@sage sage-4.1.1]$ [mv...@sage sage-4.1.1]$ ./sage -sh Starting subshell with Sage environment variables set. Be sure to exit when you are done and do not do anything with other copies of Sage! Bypassing shell configuration files ... sage$ echo $PATH /scratch/mvngu/build/sage-4.1.1:/scratch/mvngu/build/sage-4.1.1/local/bin:/home/mvngu/usr:/home/mvngu/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games sage$ exit exit Exited Sage subshell. }}} > The patch below fixes these three problems - but it may > not be what developers want. Specifically, it will set the > prompt to be "sage $" for all shells (with the exception of > csh which does not have a prompt environment variable and > so the prompt gets set to "%"). Note that with the patch > the prompt is NOT listing the current directory. > > Do developers prefer that a sage-sub-shell prompt list > the current directory? Yes, that would be nice. -- Regards Minh Van Nguyen --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---