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

Shebang args #410

Merged
merged 1 commit into from
Nov 25, 2021
Merged

Shebang args #410

merged 1 commit into from
Nov 25, 2021

Conversation

tpasternak
Copy link
Contributor

No description provided.

Comment on lines 195 to 197
def programArgs(args: RemainingArgs) = args.unparsed

def inputArgs(args: RemainingArgs) = args.remaining
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT Do we really need those methods? They don't use any of the fields of SharedOptions, are single-line, and are only called twice. Couldn't they just be inlined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 Done

final case class ShebangOptions(
@Recurse
runOptions: RunOptions = RunOptions()
) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT

Suggested change
) {}
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


import caseapp._

final case class ShebangOptions(
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT Could ShebangOptions be moved to its own file (ShebangOptions.scala), like we do for all other classes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

website/docs/reference/directives.md Outdated Show resolved Hide resolved
website/docs/reference/directives.md Outdated Show resolved Hide resolved
@tpasternak tpasternak force-pushed the shebang-args branch 2 times, most recently from 09cfe00 to 2144587 Compare November 24, 2021 21:54
When running shebang files, the system constructs a command from by
concatenating shebang line, input file name and program
arguments. This means we need a special parsing mode that would accept
only a single input, and treat everything that comes after the input
as program arguments
@tpasternak tpasternak merged commit a15fc84 into VirtusLab:master Nov 25, 2021
@tpasternak tpasternak deleted the shebang-args branch November 25, 2021 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants