-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Remove already deprecated IFS support #10840
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
base: master
Are you sure you want to change the base?
Conversation
|
This will break oh-my-fish. They still claim compatibility with fish 2.2.0 (which in practice is broken - oh-my-fish/oh-my-fish#934). Of course oh-my-fish is unmaintained at this point - oh-my-fish/oh-my-fish#947. Setting $IFS globally was never a good idea, and isn't a good idea in posixy shells either. What you do is set it locally like set -l IFS '-'
echo $FISH_VERSION | read -la version_partsThat particular usage has been replaced with Other uses would best be replaced with either I'm not saying we shouldn't remove it, but I would not want to introduce it at this point in the cycle. I'd add it right after 4.0 and then give people some time, or back it out if it's too much of a problem. |
|
Ok, I changed the milestone. I do think fish 4.0 would have been a good opportunity to finally break away from oh-my-fish issues, but it is true that we never emitted a "deprecated feature" message when IFS was set. In the meantime I might add a hack to disable globally setting IFS? |
|
I don't think we should do anything about IFS as part of the 4.0 release. We can add a feature flag in the next minor release; but I think oh-my-fish is a bigger concern and figuring out what to do about that would pay off even more. |
|
(converted this to a draft so the "merge" button is unavailable to click by accident) |
|
Not knowing much about this, I'd like to keep it for For command substitutions, it might be broken and a good idea to remove, I'm not sure. |
|
I like @krobelus's suggestion; that's a good compromise we could keep long-term and definitely beats making it a special local-only variable. |
This has been officially deprecated for a long, long time.
This removes $IFS globally (which prevents fish internals from breaking when IFS is manipulated) but keeps it as a legacy/deprecated mode of specifying `read`'s `--delimiter` value for compatibility with (ba)sh and legacy fish scripts.
|
I've reworked the commit to keep $IFS as a (still to be someday removed) means of setting I think with this approach this should be included in 4.0 as the only thing it does is make fish itself more resilient to breakage (since globally setting |
That will still break setting IFS to empty to avoid splitting command substitutions. The replacements for that were added in 3.1 (
I would not want to add it to 4.0 at this point. We could merge it first thing after, to possibly gain some information on what breaks, and back it out before 4.1 if it's too much. |
|
That's a good point and sounds reasonable to me. |
This has been officially deprecated for a long, long time.
Additionally, pretty much all aspects of fish itself (aside from the core language) break when the user messes with
$IFS(it was intentionally not a read-only variable) as all fish functions that rely on interpreting output of commands have their behavior changed in a way they can't handle. We've already decided to remove$IFSa long time ago, but if we wanted to keep it we would have to make it a special variable that only applies to the user script being executed but somehow doesn't apply to fish completions, default functions, runtime helpers, etc.As an example, executing
no longer works, because fish now thinks all of these potential paths are one long path: