Comments (5)
You can run fish_add_path -v
to see which exact set
command fish_add_path
ends up running.
Note that it will ignore duplicate and already included paths. If the path is not already included it will show something like
set -U fish_user_paths /c/Users/tyler.shellberg/.cargo/bin # and the already included paths
If it does not print anything, you can do
set -l old_path $fish_user_paths
set -e fish_user_paths
fish_add_path -v /c/Users/tyler.shellberg/.cargo/bin $old_path
to see if that runs anything.
Msys2 has some extra configuration that we know to be pretty broken - see e.g. msys2/MSYS2-packages#1634.
My assumption is that that resets $PATH to a value without your customization.
While this works, it results in the path being inserted several times into PATH, seemingly one after every entry in PATH.
The fish-native way to set $PATH is as a list, with a space between the arguments:
set PATH $PATH /c/Users/tyler.shellberg/.cargo/bin
Just like any other list in fish.
:
works because $PATH is a "path variable" that will be split on colons, but if you do that you need to quote $PATH:
set PATH "$PATH":/c/Users/tyler.shellberg/.cargo/bin
or use -a
to append a path:
set -a PATH /c/Users/tyler.shellberg/.cargo/bin
Read https://fishshell.com/docs/current/language.html#path-variables and https://fishshell.com/docs/current/language.html#combining-lists-cartesian-product for more information.
from fish-shell.
Passing -v did not print anything at all. Trying your second suggestion of using old_path, it does print something, and works:
set -U fish_user_paths /c/Users/tyler.shellberg/Documents /c/Users/tyler.shellberg/.cargo/bin
Also, set -a works without duplicating the path, so that's good. Thanks.
from fish-shell.
Passing -v did not print anything at all. Trying your second suggestion of using old_path, it does print something:
Okay, that means $fish_user_paths already included it, which means msys is messing up your $PATH after that is applied.
You'll have to talk to the msys people. Tbh I would recommend WSL instead, but that's your call of course.
from fish-shell.
Okay, that means $fish_user_paths already included it, which means msys is messing up your $PATH after that is applied.
You'll have to talk to the msys people. Tbh I would recommend WSL instead, but that's your call of course.
I use both WSL and msys. I don't have much of a choice, I definitely need to use both.
What would I report to MSYS* maintainers? I'm concerned I may get bounced back here if I don't have something concrete.
from fish-shell.
What would I report to WSL maintainers? I'm concerned I may get bounced back here if I don't have something concrete.
You'll have to tell the MSYS people (not the WSL people) that they seem to overwrite $PATH after $fish_user_paths is applied.
They might tell you more, e.g. there's apparently a "strict" path type that will cause it to reset $PATH, maybe something in your config triggers that.
Edit: Oh, apparently anything that's not "inherit" will cause that to happen. I can't recommend that, and it will kill $fish_user_paths.
from fish-shell.
Related Issues (20)
- Suppress wildcards-globbing for http(s) parameters HOT 1
- Can't use Windows Terminal's Starting Directory HOT 4
- document limitations of --condition HOT 4
- Request to add support for piping into `fish -c 'builtin'` for built-ins HOT 3
- Inconsistanc behavior when changing a symlinked folder in the current working directory HOT 1
- [Suggestion] Do not include final slash on path completion for symlinks to directories HOT 2
- `commandline` seems to lose line break characters HOT 2
- consider making `history-prefix-search-backward` and forward don't change cursor position HOT 1
- [Feature] [vi-mode] Support command count HOT 2
- cd fails for directory without read permission, displays `Permission denied` HOT 4
- `history merge` has mmap issues with certain remote filesystems HOT 8
- WARNING: 'envvar' reference target not found when running 'sphinx-build' to build docs HOT 3
- Using `read` in script cause panic
- Parse and even freeze issue on pasting large input HOT 2
- Error with scp completion HOT 6
- How to have completions for a command match that of an empty command line? HOT 2
- A strange escape sequence "^[[O"
- bind: cannot parse key '▒▒' HOT 2
- Getting the next release ready HOT 7
- Metaprogramming in fish question HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fish-shell.