Skip to content
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 support for fish shell #3108

Merged
merged 4 commits into from
Oct 9, 2023
Merged

Add support for fish shell #3108

merged 4 commits into from
Oct 9, 2023

Conversation

WaffleLapkin
Copy link
Member

This is an attempt to fix #478.

I'm not sure how to test if it works though, do I have to install local build of rustup in a vm somehow? 🤔

let mut path = PathBuf::from(home);
path.push("fish/config.d/rustup.fish");
vec![path]
} else if let Some(mut path) = utils::home_dir() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for not getting to this earlier.

We generally try to write to all the places that a shell might read. The helper we wrote is idempotent to support this. What would happen if that was done here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, to be honest I've lost all the context since I've opened this PR... Do you mean I should just call rcfiles here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approximately - look at zsh for the typical pattern

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rbtcollins the current version calls rcfiles here.

Is there anything more that I can do here?

@WaffleLapkin
Copy link
Member Author

Hm, I've also noticed that the default env script doesn't work with fish, so I've written a custom one. . ~/path/to/repo/rustup/src/cli/self_update/env.fish does add the desired path to the $PATH (after the {cargo_bin} replacement of course), so I think this should work.

Copy link
Member

@rami3l rami3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new version looks good!

@rbtcollins may I ask why this has been blocked from merging for so long?

@srcrip
Copy link

srcrip commented Sep 28, 2023

Yeah same, is there any reason this can't be merged?

@djc
Copy link
Contributor

djc commented Sep 29, 2023

@sevensidedmarble there's no point in piling on -- please bear with us while we try to increase review capacity.

@rami3l rami3l requested a review from rbtcollins October 5, 2023 09:27
@rami3l rami3l mentioned this pull request Oct 5, 2023
Copy link

@YoutacRandS-VA YoutacRandS-VA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loving the changes/updates

@WaffleLapkin WaffleLapkin deleted the turbofish branch February 24, 2024 22:39
@rami3l rami3l added the O-shell Not really OS-related, but shell-specific label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-shell Not really OS-related, but shell-specific
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PATH support doesn't work for fish shell
7 participants