Closed DanGrayson closed 4 years ago
This was already fixed, see #1061.
I'm not convinced the fix will work: it should target .zprofile instead of. zshrc, and do it even if the file doesn't exist.
480e0899a4f49f2fd2a0bdd4d57c4f353afe4d34 closes this, however, new issues arise:
By the way, this website has a good summary of what various shells do: https://kb.iu.edu/d/abdy
Oops, on the third point there is another file in play, too: "After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable."
Also, setup() seems to leave a few temp files around without cleaning them up.
@DanGrayson while doing this, do you mind also making the following change?
--- a/M2/cmake/startup.cmake
+++ b/M2/cmake/startup.cmake
@@ -54,7 +54,7 @@ set(mandir ${prefix}/${CMAKE_INSTALL_MANDIR})
set(docdir ${prefix}/${CMAKE_INSTALL_DOCDIR})
# These locations are Macaulay2 conventions
set(libm2dir ${libdir}/Macaulay2)
-set(emacsdir ${datarootdir}/emacs/site-lisp)
+set(emacsdir ${datarootdir}/emacs/site-lisp/Macaulay2)
set(GFTABLESDIR ${datarootdir}/Macaulay2/Core/factory/)
set(packagesdir ${datarootdir}/Macaulay2)
set(programsdir ${libexecdir}/Macaulay2/bin)
I made this change in configure.ac
but forgot to do it for cmake!
Sure.
About point 1, I think .zprofile
is the correct file for the commands, as they need to be done only once, not upon every invocation of the shell.
About point 1, I think
.zprofile
is the correct file for the commands, as they need to be done only once, not upon every invocation of the shell.
It's up to you, I'm just bringing up what the documentation says:
... '.zprofile' is similar to `.zlogin' ... . '.zlogin' is not the place for alias definitions, options, environment variable settings, etc.; as a general rule, it should not change the shell environment at all. Rather, it should be used to set the terminal type and run a series of external commands (fortune, msgs, etc).
That advice you quote from the documentation makes no sense at all.
There are lots of different shells out there, so for fear of not handling one of them that we don't know about, I think I'll not check the SHELL environment variable.
(Here's the list in ubuntu: /bin/sh, /bin/dash, /bin/bash, /bin/rbash, /usr/bin/screen, /usr/bin/tmux, /bin/csh.)
Does anyone know how to prevent zsh from printing an entire row of spaces before each prompt? It makes it unusable inside emacs, where the carriage return characters don't return the carriage.
resolved by 4a66fd902328c1642298254215014d82bcb49caf
@DanGrayson while doing this, do you mind also making the following change?
--- a/M2/cmake/startup.cmake +++ b/M2/cmake/startup.cmake @@ -54,7 +54,7 @@ set(mandir ${prefix}/${CMAKE_INSTALL_MANDIR}) set(docdir ${prefix}/${CMAKE_INSTALL_DOCDIR}) # These locations are Macaulay2 conventions set(libm2dir ${libdir}/Macaulay2) -set(emacsdir ${datarootdir}/emacs/site-lisp) +set(emacsdir ${datarootdir}/emacs/site-lisp/Macaulay2) set(GFTABLESDIR ${datarootdir}/Macaulay2/Core/factory/) set(packagesdir ${datarootdir}/Macaulay2) set(programsdir ${libexecdir}/Macaulay2/bin)
I made this change in
configure.ac
but forgot to do it for cmake!
Can I push this directly to development?
yes.
"zsh" doesn't read ".profile", so "setup()" doesn't result in adding anything to the PATH if "zsh" is your shell.
That shell reads "$ZDOTDIR/.zprofile", but the manual page gives no hint about the value of "ZDOTDIR"