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

Kaem will pass -- when substituting $@ #21

Open
MagicRB opened this issue Aug 13, 2021 · 4 comments
Open

Kaem will pass -- when substituting $@ #21

MagicRB opened this issue Aug 13, 2021 · 4 comments

Comments

@MagicRB
Copy link

MagicRB commented Aug 13, 2021

with a kame script

#!/bin/kaem -f

echo $@

the output will be -- arguments... if called with ./script -- arguments..., I'd expect the output to be just echo arguments...

@oriansj
Copy link
Owner

oriansj commented Aug 14, 2021

well yes. if you use bash and do the exact same thing it will include the -- in the $@ expansion.

However if you have a bootstrap specific reason for this deviation in behavior from bash it certainly would be considered and possibly adopted.

@MagicRB
Copy link
Author

MagicRB commented Aug 30, 2021

I don't need kaem to deviate but:
something.sh:

echo "$@"

with kaem:

$ kaem -f something.sh asd
UNKNOWN ARGUMENT
$ kaem -f something.sh -- asd
-- asd

with bash:

$ bash -f something.sh asd
asd
$ bash -f something.sh -- asd
-- asd

I'm using kaem to wrap mes and mescc and not being able to pass arguments through the wrapper is troublesome.

@oriansj
Copy link
Owner

oriansj commented Sep 2, 2021

I could add an option like --done that would enable that behavior: so kaem -f something.sh --done asd to produce your desired results.

@MagicRB
Copy link
Author

MagicRB commented Sep 2, 2021

That won't work in a shebang as far I'm aware sadly

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

No branches or pull requests

2 participants