Opened 11 years ago

Closed 11 years ago

#11866 closed defect (fixed)

zshell prompt

Reported by: Martin Albrecht Owned by:
Priority: minor Milestone: sage-4.7.2
Component: scripts Keywords:
Cc: Merged in: sage-4.7.2.alpha4
Authors: Martin Albrecht Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by John Palmieri)

This sucks:

malb@road:~ $ env | grep "SHELL="                                                                                                                                
SHELL=/bin/zsh
malb@road:~ $ sage -sh
...

Bypassing shell configuration files ...

SAGE_ROOT=/home/malb/Sage/current\n(sage subshell) \h:\W \u$ 

i.e., the prompt is all wrong, compared to:

malb@road:/opt/sage-4.7.2.alpha3-prerelease/local/bin $ /opt/sage-4.7.2.alpha3-prerelease/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_ROOT=/opt/sage-4.7.2.alpha3-prerelease
(sage subshell) road:/opt/sage-4.7.2.alpha3-prerelease/local/bin malb$ 

The attached patch fixes this.

Apply trac11866_proper_zsh_prompt.patch to the scripts repository, not the normal Sage repository.

Attachments (1)

trac11866_proper_zsh_prompt.patch (951 bytes) - added by Martin Albrecht 11 years ago.

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by Martin Albrecht

comment:1 Changed 11 years ago by Martin Albrecht

Authors: Martin Albrecht
Description: modified (diff)
Status: newneeds_review

comment:2 Changed 11 years ago by John Palmieri

Description: modified (diff)
Priority: majorminor
Reviewers: John Palmieri
Status: needs_reviewpositive_review

This looks good and it works in my (brief) testing. See #10822 and #11790 for patches which already include this particular fix. It's probably easiest to get this one merged, and then rebase the others with respect to this one. But if you use zsh, I would be happy to hear your input on #10822.

I think that since it seems to work, and since we came up with the same change completely independently, this can be given a positive review.

(Note that the "scripts" repository and the "root" repository are different. This should be applied to the scripts repository. I've changed the ticket description to clarify this.)

comment:3 in reply to:  2 Changed 11 years ago by Martin Albrecht

Replying to jhpalmieri:

This looks good and it works in my (brief) testing. See #10822 and #11790 for patches which already include this particular fix. It's probably easiest to get this one merged, and then rebase the others with respect to this one.

Oh, thanks!

But if you use zsh, I would be happy to hear your input on #10822.

I'll take a look.

I think that since it seems to work, and since we came up with the same change completely independently, this can be given a positive review.

Thanks!

(Note that the "scripts" repository and the "root" repository are different. This should be applied to the scripts repository. I've changed the ticket description to clarify this.)

Whoops, I thought they would have been merged a while ago.

comment:4 Changed 11 years ago by Jeroen Demeyer

Merged in: sage-4.7.2.alpha4
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.