Commit Graph

6 Commits

Author SHA1 Message Date
Jason
3cf6ebc0e1 Amend typos and grammar errors 2019-11-25 13:07:15 +01:00
Johannes Altmanninger
b7f35f949e Do not import vars that are equivalent to a universal exported var
Universal exported variables (created by `set -xU`) used to show up
both as universal and global variable in child instances of fish.

As a result, when changing an exported universal variable, the
new value would only be visible after a new login (or deleting the
variable from global scope in each fish instance).

Additionally, something like `set -xU EDITOR vim -g` would be imported
into the global scope as a single word resulting in failures to
execute $EDITOR in fish.

We cannot simply give precedence to universal variables, because
another process might have exported the same variable.  Instead, we
only skip importing a variable when it is equivalent to an exported
universal variable with the same name.  We compare their values after
joining with spaces, hence skipping those imports does not change the
environment fish passes to its children. Only the representation in
fish is changed from `"vim -g"` to `vim -g`.

Closes #5258.
This eliminates the issue #5348 for universal variables.
2019-10-19 12:41:57 +02:00
Johannes Altmanninger
9b86d5dd16 Export all local exported variables in a new scope
Fixes #6153
2019-10-06 12:10:21 -07:00
Fabian Homborg
57ffd18787 tests/checks/set: Make a temporary XDG_CONFIG_HOME
This test uses universal variables, and so it can fail when run
multiple times.

It might be a good idea to do this in general, but for now let's just
try it here.
2019-07-31 13:52:36 +02:00
ridiculousfish
e8c6de8055 Correctly export empty universal variables
Fixes #5992
2019-07-21 12:45:29 -07:00
ridiculousfish
07d1607e58 Port tests/test3.in to littlecheck
This just tests 'set'
2019-07-21 12:18:28 -07:00