Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shell: add more extensions and interpreters #3708

Merged
merged 1 commit into from
Jul 20, 2017

Conversation

smola
Copy link
Contributor

@smola smola commented Jul 3, 2017

  • ash: only interpreter, extension is more commonly used for
    Kingdom of Loathing scripting, e.g. github.com/twistedmage/assorted-kol-scripts

  • dash: only interpreter, extension is more commonly used for
    dashboarding-related stuff

  • ksh: extension was already present

  • mksh

  • pdksh

@smola smola mentioned this pull request Jul 3, 2017
Copy link
Collaborator

@Alhadis Alhadis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stellar work!

@@ -0,0 +1,2 @@
#!/usr/bin/env mksh
Copy link
Collaborator

@Alhadis Alhadis Jul 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to @mirabilos, this line should be used:

#!/bin/mksh

“This search” is broken, the standard shebang is #!/bin/mksh,
only some (predominantly older) scripts use #!/usr/bin/env mksh.

Please make sure both are recognised for scripts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Updated.

@@ -0,0 +1,2 @@
#!/usr/bin/env ash
echo "ash"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer to have samples from "real" applications (under permissive license). Alternatively, you can move those to tests/fixtures/.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can move both these and the previous ones (bash and dash) which I used as template to tests/fixtures. Although I'm not sure which test would be checking it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -4110,6 +4110,8 @@ Shell:
- ".command"
- ".fcgi"
- ".ksh"
- ".mksh"
- ".pdksh"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure there are enough .mksh or .pdksh files on github.com to warrant their addition as file extensions. Adding the shebang might be sufficient anyway...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither pdksh used to nor mksh uses the shell name as script extension, we use just .sh or no extension in the general case, .ksh is seen rarely and more for AT&T ksh scripts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@pchaigno pchaigno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request!

I left comments inline for a few things I think we should address before merging.

* ash: only interpreter, extension is more commonly used for
  Kingdom of Loathing scripting, e.g. github.com/twistedmage/assorted-kol-scripts

* dash: only interpreter, extension is more commonly used for
  dashboarding-related stuff

* ksh: extension was already present

* mksh

* pdksh
@smola
Copy link
Contributor Author

smola commented Jul 17, 2017

@pchaigno Done.

@lildude lildude merged commit 470a82d into github-linguist:master Jul 20, 2017
@lildude lildude mentioned this pull request Jul 20, 2017
@smola smola deleted the more-shells branch December 19, 2020 16:22
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants