Skip to content

Allow executable scripts to not have any suffix (.sc or .scala) at all? #466

@SethTisue

Description

@SethTisue

When you're using Scala as a scripting language, with #!/usr/bin/env scala-cli shebang, it would be nice if I could just have an executable script called foo and not have to name it foo.sc or foo.scala.

For me as the author of the script having the suffix is not so bad, but for those who are using my script, it might be weird and annoying to have to say foo.sc; they would prefer to just run the script as foo and not even care whether it's written in C or Shell or Scala or what have you. To the user it's just some executable thing. Perhaps it's even on their $PATH.

I've been writing scripts for decades now in Perl, Bash, Scala, and assorted other languages and none of those languages have disallowed me from using a bare filename. (I have Scala on that list because until recently I was using sbt's ScriptMain support, which allowed this.)

Metadata

Metadata

Assignees

Labels

SIP-46All the issues related to SIP-46 to turn Scala CLI into the official scala runner command.UX

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions