Ticket #4644 (closed defect: fixed)
[with patch, positive review] No new prompt when doing a ./sage -sh
| Reported by: | jsp | Owned by: | was |
|---|---|---|---|
| Priority: | major | Milestone: | sage-4.1.2 |
| Component: | user interface | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | Mike Hansen | |
| Authors: | Mariah Lenox | Merged in: | sage-4.2.1.final |
| Dependencies: | Stopgaps: |
Description
We used to have:
[jaap@paix sage-3.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! Sage subshell$ exit exit Exited Sage subshell. [jaap@paix sage-3.1.1]$
But in sage-3.2:
[jaap@paix sage-3.2]$ ./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! [jaap@paix sage-3.2]$
I've been bitten by this once more!
Jaap
Attachments
Change History
comment:2 Changed 4 years ago by jsp
Ok, sorry. We had a discussion long time ago. You said you were bitten by this many times!
Due to #4512 mhansen: Could we at least have a PS1 that includes the current directory? I always hated it when I was on a machine where "sage -sh" didn't use my existing PS1.
We now have the trouble of finding out which shell we use!
Exited Sage subshell. [jaap@paix sage-3.2.1.rc0]$ vi local/bin/sage-sage [jaap@paix sage-3.2.1.rc0]$ ./sage -sh /usr/bin/env: bash -x: No such file or directory [jaap@paix sage-3.2.1.rc0]$ which bash /bin/bash [jaap@paix sage-3.2.1.rc0]$ local/bin/sage-sage /usr/bin/env: bash -x: No such file or directory [jaap@paix sage-3.2.1.rc0]$
Jaap
comment:3 Changed 4 years ago by jsp
Maybe we can have a PS1 that is different and includes the current directory!
I've been bitten by this "defect" once more.
Jaap
comment:4 Changed 4 years ago by jsp
From sage-devel:
William Stein wrote: > The justification for the existence of "./sage -sh" is that you can > type "exit" to get out of that subshell, and all the Sage environment > variables are no longer defined. Also, on some systems "./sage -sh" > changes the prompt as a reminder (it's a bug that it doesn't do this > on all systems). > +1 This is http://trac.sagemath.org/sage_trac/ticket/4644 I opened 6 month ago. We have to thank Mike Hansen and Craig Citro for this :) http://trac.sagemath.org/sage_trac/ticket/4512 Mike: > Could we at least have a PS1 that includes the current directory? I always hated it when I was on a machine where "sage -sh" didn't use my existing PS1. Craig: > Yeah, that would be very reasonable. Jaap
comment:5 Changed 4 years ago by ddrake
- Summary changed from No new prompt when doing a ./sage -sh to [with patch, needs review] No new prompt when doing a ./sage -sh
There's a suggested solution to this problem: http://groups.google.com/group/sage-devel/browse_thread/thread/384d4fe7dabb722c/
I'll upload the patch from that thread in a moment.
comment:6 Changed 4 years ago by mhansen
- Reviewers set to Mike Hansen
- Summary changed from [with patch, needs review] No new prompt when doing a ./sage -sh to [with patch, positive review] No new prompt when doing a ./sage -sh
- Authors set to Mariah Lenox
I think this seems good.
Note that the patch applies to the scripts repo.


Hi Jaap,
this one should have gone to [sage-devel] since we need to find out what the bug is. Anmd having a discussion on the ticket sucks. But:
Cheers,
Michael