Skip to content

Why do I need to set -U XDG_DATA_DIRS /usr/local/share in order to get fish to pick up locally installed functions? #8482

Closed Answered by kidonng
ioquatix asked this question in Q&A
Discussion options

You must be logged in to vote

How did you install fish? What is the content of $__fish_data_dir/__fish_build_paths.fish on your machine? The content of that file is used to load the vendored scripts and functions. If you are using Homebrew it should automatically pick up stuff under Homebrew's prefix.

My best bet is that you are using a Apple Silicon machine, where Homebrew will use /opt/homebrew as its prefix, and hence stuff under /usr/local will not be loaded automatically.

Regardless of the cause of the problem, you can use $XDG_DATA_DIRS. It is there for a reason.

Replies: 4 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@ioquatix
Comment options

Answer selected by ioquatix
Comment options

You must be logged in to vote
1 reply
@ioquatix
Comment options

Comment options

You must be logged in to vote
1 reply
@page-down
Comment options

Comment options

You must be logged in to vote
5 replies
@page-down
Comment options

@zanchey
Comment options

@page-down
Comment options

@kovidgoyal
Comment options

@zanchey
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants