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

[BREAKING] Multiline commands are now joined with a newline + arguments ($@) are no longer attached automatically to the command #35

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

DannyBen
Copy link
Owner

@DannyBen DannyBen commented Jun 20, 2024

⚠️ This is a breaking change.

Multiline commands are simpler to use

In previous versions, multiline commands like this would have been merged with &&:

command:
  echo "one"
  echo "two"

In this PR, they are joined with a newline, to allow for a wider use case spectrum.

Arguments are no longer attached automatically

In previous versions, a configuration file like this:

greet: echo Hello

would have yielded "Hello World" when executed as op greet World.

Now, due to the possibility that this is not necessarily desired (in multiline commands), you need to use argv variables - $@, $1, $2 etc - wherever you need them. So in order for the above configuration to work as before, it needs to be written as:

greet: echo "Hello $@"
# or 
greet: echo "Hello $1"

DannyBen added 2 commits June 20, 2024 09:16
…ents (`$@`) are no longer attached automatically to the command
@DannyBen DannyBen merged commit 391b617 into master Jun 20, 2024
4 checks passed
@DannyBen DannyBen deleted the refactor branch June 20, 2024 09:53
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.

None yet

1 participant