#15590: Pimp my Shell
-------------------------------------+-------------------------------------
Reporter: vbraun | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.2
Component: scripts | Resolution:
Keywords: | Merged in:
Authors: Volker Braun | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vbraun/pimp_my_shell | f2b46b47f05d899041c49c70b58d82d4b36eaf99
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jhpalmieri):
This is not working for me on OS X. On one machine, `$SHELL` is set to
`/bin/bash` but I don't get an interesting prompt: I just get `bash-3.2$`.
As far as I can tell, this is not loading my `.bashrc` file (I put an echo
command in there to see, and nothing is printed). So I don't think it's
loading `src/ext/shell/bashrc`, either. On another OS X machine, it's
running bash but `$SHELL` is set to `/bin/sh`. I tried making the
following changes, but it didn't help: the prompt remained `sh-3.2$`.
{{{
#!diff
diff --git a/src/bin/sage b/src/bin/sage
index c01fea2..8770a57 100755
--- a/src/bin/sage
+++ b/src/bin/sage
@@ -278,6 +278,21 @@ if [ "$1" = '-sh' -o "$1" = '--sh' ]; then
export ZDOTDIR="$SAGE_EXTCODE/shell"
set -- "$SHELL" -d "$@"
;;
+ sh)
+ # see http://stackoverflow.com/a/3327022/1401572
+ if [ -n $BASH ]; then
+ set -- "$SHELL" --rcfile "$SAGE_EXTCODE/shell/bashrc"
"$@"
+ elif [ -n $ZSH_NAME ]; then
+ export ZDOTDIR="$SAGE_EXTCODE/shell"
+ set -- "$SHELL" -d "$@"
+ elif [ -n $KSH_VERSION ]; then
+ export ENV="$SAGE_EXTCODE/shell/kshrc"
+ set -- "$SHELL" "$@"
+ else
+ source "$_SAGE_ENV_SCRIPT"
+ set -- "$SHELL" "$@"
+ fi
+ ;;
*)
# We don't know how to specify alternate startup file, you are
on your own
source "$_SAGE_ENV_SCRIPT"
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/15590#comment:8>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.