On 2 Nov., 01:22, Keshav Kini <[email protected]> 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) \[\033[01;32m\]\u@\h\[\033[01;34m\] \w $\[\033[00m\]
> "
>
> Maybe useful?
I don't exactly understand what you mean, but at least for bash we
could first run an "interactive" shell to just get the prompt, and
then append to that (PS1) before starting the real interactive shell:
case "$SHELL_NAME" in
bash)
PS1="`bash -i -c 'echo $PS1'` sage>"
...
...
esac
-leif
--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org