[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-05 Thread P Purkayastha
On Wednesday, November 2, 2011 9:11:12 AM UTC+8, leif wrote: On 2 Nov., 01:22, Keshav Kini kesha...@gmail.com wrote: Another possibility is to set PS1 in the new shell to an expanded PS1 from the old shell by creating a dynamic string: fs@zhenghe ~/tmp $ echo export PS1=\(sage

Re: [sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-05 Thread Martin Albrecht
case $SHELL_NAME in It's not that terribly important, by this wouldn't work for my ZShell prompt because i use more advanced features in my prompt. In particular, my prompt displays the revision number of the hg repository I'm in and whether it's clean or not. Hence, additional modules need

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-05 Thread leif
On 5 Nov., 15:44, Martin Albrecht martinralbre...@googlemail.com wrote: case $SHELL_NAME in It's not that terribly important, by this wouldn't work for my ZShell prompt because i use more advanced features in my prompt. In particular, my prompt displays the revision number of the hg

Re: [sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-05 Thread Jeroen Demeyer
On 2011-11-05 15:44, Martin Albrecht wrote: case $SHELL_NAME in It's not that terribly important, by this wouldn't work for my ZShell prompt because i use more advanced features in my prompt. In particular, my prompt displays the revision number of the hg repository I'm in and whether it's

Re: [sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-05 Thread Ivan Andrus
On Nov 5, 2011, at 3:44 PM, Martin Albrecht wrote: case $SHELL_NAME in It's not that terribly important, by this wouldn't work for my ZShell prompt because i use more advanced features in my prompt. In particular, my prompt displays the revision number of the hg repository I'm in and

Re: [sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-05 Thread John H Palmieri
Well, as I mentioned above, the current plan in #11790 is, among other things, to source a file ~/.sage/.sagerc (if it exists), so maybe you can add code to set your prompt there. -- John -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group,

Re: Re: [sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-05 Thread Martin Albrecht
On Saturday 05 November 2011, John H Palmieri wrote: Well, as I mentioned above, the current plan in #11790 is, among other things, to source a file ~/.sage/.sagerc (if it exists), so maybe you can add code to set your prompt there. That sounds like a great plan. Cheers, Martin -- name:

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-01 Thread Maarten Derickx
If we do this we should make it clear in the opening message how to find out in which sage shell you are. For the rest a big +1 -- 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

Re: [sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-01 Thread William Stein
On Mon, Oct 31, 2011 at 10:52 PM, leif not.rea...@online.de wrote: On 1 Nov., 06:15, leif not.rea...@online.de wrote: On 1 Nov., 04:45, William Stein wst...@gmail.com wrote: Who changed the prompt to be long and two lines in the first place, and what do they think? Well, it had been a

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-01 Thread leif
On 1 Nov., 18:07, William Stein wst...@gmail.com wrote: On Mon, Oct 31, 2011 at 10:52 PM, leif not.rea...@online.de wrote: On 1 Nov., 06:15, leif not.rea...@online.de wrote: On 1 Nov., 04:45, William Stein wst...@gmail.com wrote: Who changed the prompt to be long and two lines in the

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-01 Thread Jason Grout
On 10/31/11 5:55 PM, P Purkayastha wrote: As for having the same prompt as the user has defined in ~/.shellrc, I don't think it is possible since the sage subshell is specifically launched so as not to read user files from ~. But it inherits PS1 from the user environment, right? Couldn't it

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-01 Thread Keshav Kini
That's what I thought too, but upon testing it seems that PS1 is somehow special in this regard: fs@zhenghe ~/tmp $ export $FOO=bar fs@zhenghe ~/tmp $ echo $PS1 \[\033[01;32m\]\u@\h\[\033[01;34m\] \w $\[\033[00m\] fs@zhenghe ~/tmp $ cat ps1test echo PS1 in this script is $PS1 PS1=foo $PS1 bash

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-01 Thread John H Palmieri
On Tuesday, November 1, 2011 5:07:47 PM UTC-7, Keshav Kini wrote: That's what I thought too, but upon testing it seems that PS1 is somehow special in this regard: That's what I discovered, too. The current idea (at #11790) is that you can set a new environment variable, SAGE_SHPROMPT,

Re: [sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-01 Thread Willem Jan Palenstijn
On Tue, Nov 01, 2011 at 05:07:47PM -0700, Keshav Kini wrote: That's what I thought too, but upon testing it seems that PS1 is somehow special in this regard: PS1 is only set in interactive shells: [wjp@aldur ~]$ bash -c 'echo $PS1' [wjp@aldur ~]$ bash -i -c 'echo $PS1' [\u@\h \w]$ -Willem

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-01 Thread Keshav Kini
Another possibility is to set PS1 in the new shell to an expanded PS1 from the old shell by creating a dynamic string: fs@zhenghe ~/tmp $ echo export PS1=\(sage -sh) $PS1\ #run this string in the new shell export PS1=(sage -sh) \[\033[01;32m\]\u@\h\[\033[01;34m\] \w $\[\033[00m\] Maybe

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-01 Thread leif
On 2 Nov., 01:22, Keshav Kini keshav.k...@gmail.com wrote: Another possibility is to set PS1 in the new shell to an expanded PS1 from the old shell by creating a dynamic string: fs@zhenghe ~/tmp $ echo export PS1=\(sage -sh) $PS1\ #run this string in the new shell export PS1=(sage -sh)

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-11-01 Thread Keshav Kini
Yeah, something like that is what I meant. Grab the PS1 from a running interactive shell. -Keshav Join us in #sagemath on irc.freenode.net ! -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-10-31 Thread Jason Grout
On 10/31/11 3:45 PM, John H Palmieri wrote: A quick survey for people who use sage -sh: - Do you find the current multiline shell prompt useful? No. It's always confusing me. - Would you prefer that the prompt is shorter, and in particular, a single line? Emphatically yes. Can you use

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-10-31 Thread Simon King
Hi John, On 31 Okt., 21:45, John H Palmieri jhpalmier...@gmail.com wrote: A quick survey for people who use sage -sh:  - Do you find the current multiline shell prompt useful? No.  - Would you prefer that the prompt is shorter, and in particular, a single line? Yes. It seems nice to

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-10-31 Thread P Purkayastha
On Tuesday, November 1, 2011 5:20:53 AM UTC+8, Simon King wrote: Hi John, Suggestion: (sage-sh) king@mpc622:~/Projekte/MeatAxe$ I also vote for a shorter prompt. Simply having (sage-sh) in addition to the stuff we usually do seems good enough. As for having the same prompt as

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-10-31 Thread leif
On 31 Okt., 22:13, Martin Albrecht martinralbre...@googlemail.com wrote: On Monday 31 October 2011, John H Palmieri wrote: A quick survey for people who use sage -sh:  - Do you find the current multiline shell prompt useful? No, I find it rather annoying and ugly actually. +1 (Me, too.)

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-10-31 Thread leif
On 1 Nov., 04:45, William Stein wst...@gmail.com wrote: Who changed the prompt to be long and two lines in the first place, and what do they think? Well, it had been a two-line prompt before #9527, but it's also funny who reviewed that... ;-) On Monday, October 31, 2011, leif

[sage-devel] Re: The sage -sh shell prompt: any objections to shortening it?

2011-10-31 Thread leif
On 1 Nov., 06:15, leif not.rea...@online.de wrote: On 1 Nov., 04:45, William Stein wst...@gmail.com wrote: Who changed the prompt to be long and two lines in the first place, and what do they think? Well, it had been a two-line prompt before #9527, but it's also funny who reviewed that...