Hello,
This bug report is for Maxima 5.42.1 running under macOS 10.13.6 (full build info below).
When a user's default shell is tcsh the main.scpt launch script fails due to execution of bash/sh commands.
I've found two possible solutions: 1) pipe the commands to bash, or 2) use the "do shell script" command (which always uses bash) instead of opening a terminal and using "do script" as is currently done.
Text versions of the script for both solutions are attached.
-Larry
wxMaxima version: 18.10.1
using wxWidgets version: wxWidgets 3.1.1
Maxima version: 5.42.1
Maxima build date: 2018-10-18 19:07:57
Host type: x86_64-apple-darwin13.4.0
System type: Darwin 17.7.0 X86-64
Lisp implementation type: SBCL
Lisp implementation version: 1.4.12
Hi Robert,
The bash command set is a superset of the sh command set, and I believe it
is backwards compatible with sh. Tcsh doesn't use the same syntax or
keywords as bash or sh (it is a superset of csh, the other early Unix
shell). Below are equivalent bash and tcsh commands.
bash/sh:
bar="hello"
export foo="there"
tcsh/csh:
set bar = "hello"
setenv foo "there"
Both of the AppleScript scripts I attached in my bug report should work no
matter what the user's default shell is (although I've only tested with
tcsh), and are fairly minimal modifications of the original AppleScript
scripts.
Personally I'd choose the version that doesn't briefly open a Terminal
window, but there may have been reasons for opening a Terminal window which
I am unaware of (debugging?).
Cheers,
-Larry
On Sun, Jan 20, 2019 at 11:08 PM Robert Dodier robert_dodier@users.sourceforge.net wrote:
Related
Bugs: #3516
Larry, thanks for working on this problem. What are the commands which cause trouble for tcsh? I think some effort has been made to avoid bash-specific commands and use only sh commands. Perhaps it's possible to modify things so that tcsh is accommodated too.
Hi Robert,
I replied to your coment in email (I'm on the maxima bugs mailing list), I'm new to this so not sure if my reply will show up here. In case, it doesn't I've included it below. Apologies if this is redundant.
The bash command set is a superset of the sh command set, and I believe it is backwards compatible with sh. Tcsh doesn't use the same syntax or keywords as bash or sh (it is a superset of csh, the other early Unix shell). Below are equivalent bash and tcsh commands.
bash/sh:
bar="hello"
export foo="there"
tcsh/csh:
set bar = "hello"
setenv foo "there"
Both of the AppleScript scripts I attached in my bug report should work no matter what the user's default shell is (although I've only tested with tcsh), and are fairly minimal modifications of the original AppleScript scripts.
Personally I'd choose the version that doesn't briefly open a Terminal window, but there may have been reasons for opening a Terminal window which I am unaware of (debugging?).
Cheers,
-Larry