This is a continuation of #4160. The delimiter is now used as a complete string like in
The IFS fallback remains - we should not remove it in 3.0, but we should deprecate it somehow.
Fixes issue #4156.
The text was updated successfully, but these errors were encountered:
When executing a function, local-exported (`set -lx`) variables previously were not accessible at all. This is weird e.g. in case of aliases, since ```fish set -lx PAGER cat git something # which will call $PAGER ``` would not work if `git` were a function, even if that ends up calling `command git`. Now, we copy these variables, so functions get a local-exported copy. ```fish function x echo $var set var wurst echo $var end set -lx var banana x # prints "banana" and "wurst" echo $var # prints "banana" ``` One weirdness here is that, if a variable is both local and global, the local-copy takes precedence: ```fish set -gx var banana set -lx var pineapple echo $var # prints "pineapple" x # from above, prints "pineapple" and "wurst" echo $var # still prints "pineapple" set -el var # deletes local version echo $var # "banana" again ``` I don't think there is any more consistent way to handle this - the local version is the one that is accessed first, so it should also be written to first. Global-exported variables are _not_ copied, instead they still offer full read-write access.
This used to create copies even then, which meant it couldn't modify them.
When reporting whether a boolean flag was seen report the actual flags rather than a summary count. For example, if you have option spec `h/help` and we parse `-h --help -h` don't do the equivalent of `set _flag_h 3` do `set _flag_h -h --help -h`. Partial fix for fish-shell#4226
While I agree that's the better API design I'm not worried about it. Because with 32 bit ints we would have to do more than 2 billion splits before unintentionally and prematurely terminating the loop. Something that is unlikely to ever happen. Even with 16 bit ints it is pretty unlikely to ever be a problem.
Sure. There's no real rush.
One more thing that would change is that currently
Anyway, I just wanted to mention it since I'm touching the function and making it more prominent.