You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Trying to erase and (un)export at the same time doesn't make sense.if (opts.erase && (opts.exportv || opts.unexport)) {
streams.err.append_format(BUILTIN_ERR_COMBO, cmd);
builtin_print_help(parser, streams, cmd, streams.err);
return STATUS_INVALID_ARGS;
}
I am guessing erase should no longer have [SCOPE_OPTIONS]
It should. set -el and set -eg are quite useful.
set -ex and set -eu were disallowed in 17cf255, because of #4263.
Note that "-x" isn't a scope! It's a modifier to a variable. You can have universal-exported, global-exported or local-exported variables. But for each name, you can only ever have one export-state:
set-gx banana foo
set-lu banana bar
env# won't show banana at allset-e banana
Because of that, most of the time when people use just "-x" without a scope, they should actually be adding one.
It's possible that changes to this are sensible, I'm not sure. But with the current system, set -ex indeed makes no sense.
So we should either change exporting (which is one of those annoyingly backwards-incompatible things), or fix the documentation.
zanchey
added
bug
Something that's not working as intended
docs
An issue/PR that touches or should touch the docs
labels
Feb 14, 2020
I used to use "set -ex" in a script which is no longer supported in fish 3.0 it seems. Yet set --help still shows.
I am guessing erase should no longer have [SCOPE_OPTIONS], either that or the set command is broken.
The text was updated successfully, but these errors were encountered: