#10822: sage -sh doesn't set the path right if default shell is zsh on OSX
-----------------------+----------------------------------------------------
Reporter: jason | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone:
Component: scripts | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author: John Palmieri
Merged: | Dependencies: #11866, #11790
-----------------------+----------------------------------------------------
Comment(by ppurka):
Sorry, I got my exports all backwards.
{{{
#!diff
# HG changeset patch
# User P Purkayastha <[email protected]>
# Date 1317311589 -28800
# Node ID 09875d34e10e03692a831a8b5cb9f65693c6a7b3
# Parent f8f1496d316ce8556a8d7350de61e0f755c23681
[mq]: trac_10822_fix_zsh_shell.patch
diff --git a/sage-sage b/sage-sage
--- a/sage-sage
+++ b/sage-sage
@@ -497,7 +497,20 @@
SHELL_OPTS=" -f"
;;
zsh)
- SHELL_OPTS=" -f -d"
+ FILE="/tmp/.zshrc"
+ if [ -e "$FILE" ]; then
+ if ! rm -f "$FILE"; then
+ echo "No permission to delete and create new file
$FILE"
+ exit 1
+ fi
+ fi
+ cat > "$FILE" << EOF
+export PATH="$SAGE_ROOT:$SAGE_LOCAL/bin:$PATH"
+export PS1="%m:%~ %n$ "
+export RPROMPT=" #SAGE_ROOT=${SAGE_ROOT} (sage subshell)"
+EOF
+ ZDOTDIR="/tmp" && export ZDOTDIR
+ SHELL_OPTS="-o noglobalrcs"
;;
*)
echo >&2 "Unknown shell: $SHELL!"
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10822#comment:18>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.