-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
starship doesn't work if not in PATH (starship: command not found) #220
Comments
I don't know if this really is a starship problem. |
I use direnv and pazi in a similar way. direnv use its full path but not pazi.
I use home-manager with Nix and I can use starship like this: programs.bash = {
enable = true;
initExtra = ''
eval "$(${pkgs.starship}/bin/starship init bash)"
''; This way, when I run I think fixing this issue would also be easier to use starship as a prompt inside a pure nix-shell where the PATH is not defined the same way. I can test that. |
Yeah if I have |
Sorry, I misunderstood the problem. Going to add @chipbuster to the conversation 👈 |
I have a PR almost ready for that. Using It's also tricky in case there's spaces in the path (which I solved) and doublesquotes |
Thank you for tackling it! 😄 |
@bbigras I think the security warning there might actually apply to us, if someone decides to use Starship as their prompt for a superuser. Will need to think about it carefully, since the linked security vulnerability involves a race condition (and those are hard to get right). Good to have a patch, but we may need to do some modifications before merging. |
@bbigras I just thought of an alternate solution: The only reason we do this two-phase at the moment is because I wanted to retain compatibility with Would it be possible for you to instead replace |
|
@bbigras Dang :( It seems like the old one-phase init wouldn't have worked here either then? |
Bug Report
Current Behavior
Expected Behavior
It should work.
Additional context/Screenshots
Environment
Possible Solution
The problem is that
starship init
andstarship prompt
only usestarship
and not its full path.I have a PR for this.
The text was updated successfully, but these errors were encountered: