2009/9/25 Minh Nguyen <nguyenmi...@gmail.com>: > > 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
Possibly a bit out of context. But I was hit by "sage -sh" yesterday. I run "./sage -sh" to make some tests, and gone do other duties in the meantime. Then, I forgot I was under a sage 4.1.1 shell in that xterm, and things started working incorrectly. Curiously, I had been debugging a problem with java-1.6-openjdk-plugin and java-1.6-sun-plugin, where only the sun plugin works in my Mandriva setup, when loading the jmol plugin. (I was testing/comparing both, the mandriva rpm package, and sage-4.1.1 binary downloaded from a sagemath mirror). Then, after playing with install/uninstall of several packages, I ended up in a state where firefox would always refuse to start, and the reason was LD_LIBRARY_PATH, because I was starting firefox from the xterm that was running "sage -sh". Paulo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---