Skip to content

Add support for fish shell - #3108

Merged
rami3l merged 4 commits into
rust-lang:masterfrom
WaffleLapkin:turbofish
Oct 9, 2023
Merged

Add support for fish shell#3108
rami3l merged 4 commits into
rust-lang:masterfrom
WaffleLapkin:turbofish

Conversation

@WaffleLapkin

Copy link
Copy Markdown
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? 🤔

Comment threadsrc/cli/self_update/shell.rs Outdated
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
Copy Markdown
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
Copy Markdown
MemberAuthor

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
Copy Markdown
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
Copy Markdown
MemberAuthor

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?

Comment threadsrc/cli/self_update/shell.rs Outdated
@WaffleLapkin

Copy link
Copy Markdown
MemberAuthor

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.

@rami3lrami3l left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown

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

@djc

djc commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

@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 rbtcollinsOctober 5, 2023 09:27
@rami3lrami3l mentioned this pull request Oct 5, 2023
alex
alex approved these changes Oct 9, 2023

@YoutacRandS-VAYoutacRandS-VA left a comment

Copy link
Copy Markdown

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
@rami3lrami3l added the O-shell Not really OS-related, but shell-specific label Jul 10, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-shellNot 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

@WaffleLapkin@srcrip@djc@alex@rbtcollins@rami3l@YoutacRandS-VA