-
Notifications
You must be signed in to change notification settings - Fork 782
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
bug: fish path set-up breaks fish_add_path #1629
Comments
I am in the same boat. Just stumbled on this thread today. I am new to fish so working through and figuring out what is going on is going to take time. Would appreciate if you do end up finding a solution, if you share it. |
I can confirm this is an issue. I had to remove asdf from my system because of this. |
@richjdsmith, in case this is useful to you six weeks later, I workaround this behaviour by adding the asdf paths manually in my fish config file before sourcing the set-up script: fish_add_path "$ASDF_DIR/bin"
fish_add_path "$HOME/.asdf/shims"
if status --is-interactive && type -q asdf
source (brew --prefix asdf)/libexec/asdf.fish
end This works because asdf first checks whether these paths are present before setting the global variable. Ideally it wouldn't be necessary. |
Closed by #1699 |
Describe the Bug
The fish set-up script sets
fish_user_paths
as a global variable. This breaks the expected behaviour of this variable, which is a universal variable by default. Universal variables persist across fish sessions; global variables are specific to the current session. Global variables, when present, take precedence over universal variables of the same name. The impact of this is that users callingfish_add_path /some/path
unexpectedly find that the assignment is not persisted across sessions.This has previously been raised as an issue on fish itself, and noted as a comment on another issue in this repo, but I think it's deserving of its own issue.
Steps to Reproduce
fish_user_paths
withfish_add_path /some/path
Expected Behaviour
The path assignment is persisted across sessions.
Actual Behaviour
The path assignment is only applied in the current session.
Environment
OS: Darwin XX379KM0VT 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 arm64 SHELL: fish, version 3.6.0 BASH VERSION: 3.2.57(1)-release ASDF VERSION: v0.12.0 ASDF INTERNAL VARIABLES: ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions ASDF_DATA_DIR=/Users/thom/.asdf ASDF_DIR=/opt/homebrew/Cellar/asdf/0.12.0/libexec ASDF_CONFIG_FILE=/Users/thom/.asdfrc ASDF INSTALLED PLUGINS: nodejs https://github.com/asdf-vm/asdf-nodejs.git master c9e5df4 python https://github.com/danhper/asdf-python.git master 8505457 ruby https://github.com/asdf-vm/asdf-ruby.git master 16bc8ac terraform https://github.com/asdf-community/asdf-hashicorp.git master c44c314
asdf plugins affected (if relevant)
No response
The text was updated successfully, but these errors were encountered: