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

Use current fish path instead of fish command #716

Merged
merged 1 commit into from
May 26, 2022
Merged

Use current fish path instead of fish command #716

merged 1 commit into from
May 26, 2022

Conversation

IlanCosman
Copy link
Contributor

fish may not be an available command, for example if it was installed through brew. Whenever I rm -r ~/.config/fish/ on my mac (for developing Tide), I have to fish_add_path /opt/homebrew/bin/ before I run my fisher command. Instead, lets just guarantee a valid command by using the path to the current instance of fish. Tide already does this and it has worked fine so far.

@IlanCosman IlanCosman changed the title Use current fish path isntead of fish command Use current fish path instead of fish command May 23, 2022
@jorgebucaran
Copy link
Owner

@IlanCosman This requires at least what version of Fish?

@IlanCosman
Copy link
Contributor Author

Do you mean when did status fish-path get released? It's been there since Fish 3.0 fish-shell/fish-shell@e212269.

And I'm pretty sure foo=bar as a way of setting variables has been around for a while as well. Can always change it to set if not.

set --local source (command mktemp -d)
set --append source_plugins $source

command mkdir -p $source/{completions,conf.d,functions}

fish --command "
$fish_path --command "
Copy link
Owner

Choose a reason for hiding this comment

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

Is this also Fish 3.0 or was it introduced more recently?

Copy link
Owner

Choose a reason for hiding this comment

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

I know this has been around for a while now. Just checking.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@faho Sorry to bother but would you happen to know when variable-in-command-position was released? Tried combing through the release notes but couldn't find it.

Copy link
Owner

Choose a reason for hiding this comment

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

It seems that this is in since 3.0 as well! 🎉

Copy link
Owner

Choose a reason for hiding this comment

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

Copy link
Owner

@jorgebucaran jorgebucaran left a comment

Choose a reason for hiding this comment

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

LGTM

Will merge here and release tomorrow! Thanks.

@jorgebucaran
Copy link
Owner

fish may not be an available command, for example if it was installed through brew.

Doesn't brew put Fish in your PATH? I install Fish via brew too and I've never had to do that. Or I could've added it myself and forgotten about it. 😅

@IlanCosman
Copy link
Contributor Author

Doesn't brew put Fish in your PATH?

/opt/homebrew/bin/ isn't in PATH by default. Has to get added, If you want to test it, back up your ~/.config/fish and then delete it. You shouldn't have access to any commands installed through brew.

@jorgebucaran
Copy link
Owner

Yes. Then I must have added it to my PATH. Makes sense. 👍

@jorgebucaran jorgebucaran merged commit b3c5336 into jorgebucaran:main May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants