-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add initial set
support
#36
base: master
Are you sure you want to change the base?
Conversation
set
constructsset
support
Nice, just some tests :) |
Done! |
@@ -333,6 +333,8 @@ echo ${cool+a} | |||
echo ${cool:+a} | |||
echo ${cool-a} | |||
echo ${cool:-a} | |||
set -Cefu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we're just silently ignoring this, maybe that's not good? Can we support some of these options? Or is there no fish equivalent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's any fish equivalent for these, see the picture in: #34 (comment).
And the later description:
Of these,
-C
doesn't exist in fish, and-e
,-f
,-u
all have different meanings.
As-is they'll break fish scripts, so my approach is to filter them out.
For more detail, someone writing set -e
in UNIX shells is expecting to terminate the script early on errors, with some caveats. Someone writing set -e
on fish
is expecting to erase a shell variable, akin to what would be unset
.
I'm yet to support
Makes sense to add those two translations to this PR. Checklist:
|
Supported Since Tried adding more logic to If we skip it for lines akin to |
Fixes #34 #35
Would love some guidance to create the tests.
Note: Currently doesn't support
set -- x y "$@"
to append. This is equivalent tofish
'sset -a argv x y