Jason Grout <jason-s...@creativetrax.com> writes:
> -1 to magic parsing of 'sage foo'.  What if sage-foo was later added
> to sage?  Then things would break for people.

I agree. This works for `git` only because `git <filename>` is not valid
usage.

> I like the idea of 'sage run foo' to run foo.  How would that be added
> to a script file, though?
>
> #!/path/to/sage/sage run
> do some commands

Exactly. But as I mentioned in a previous post, the following does not
work on Linux:

#!/usr/bin/env sage run
do some commands

This is because under Linux, the hashbang is executed as

$ /usr/bin/env "sage run" $FILENAME

and not

$ /usr/bin/env sage run $FILENAME

for some reason which is not clear to me. If this were not the case, or
if there is some known workaround to this which we could document, I'd
definitely go with `sage run foo`.

-Keshav

----
Join us in #sagemath on irc.freenode.net !

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to