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

expose fish integration configuration via XDG_DATA_DIRS #168211

Merged
merged 8 commits into from Dec 16, 2022

Conversation

mkhl
Copy link
Contributor

@mkhl mkhl commented Dec 6, 2022

closes #139400

XDG_DATA_DIRS is specified1 as

a set of preference ordered base directories relative to which data files should be searched.

the fish shell uses it2 (among other things)
to let other tools provide additional configuration files
for the fish shell to load on startup.

this change exposes the fish shell integration configuration script
in a place matching what fish expects
(in a fish/vendor_conf.d subdirectory)
and appends the exposed directory to the value of XDG_DATA_DIRS
if automatic shell integration is requested.
if XDG_DATA_DIRS is unset it uses the specified default value
/usr/local/share:/usr/share
and appends the exposed xdg_data directory to that.

closes microsoft#139400

`XDG_DATA_DIRS` is specified[1] as
> a set of preference ordered base directories relative to which data files should be searched.

the fish shell uses it[2] (among other things)
to let *other tools* provide additional configuration files
for the fish shell to load on startup.

this change exposes the fish shell integration configuration script
in a place matching what fish expects
(in a `fish/vendor_conf.d` subdirectory)
and appends the exposed directory to the value of `XDG_DATA_DIRS`
if automatic shell integration is requested.
if `XDG_DATA_DIRS` is unset it uses the specified default value
`/usr/local/share:/usr/share`
and appends the exposed xdg_data directory to that.

[1]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
[2]: https://fishshell.com/docs/current/language.html#configuration-files
@mkhl
Copy link
Contributor Author

mkhl commented Dec 6, 2022

@microsoft-github-policy-service agree

Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

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

Nice work @mkhl, we'll need to make sure this works when bundled but it seems to work great out of main!

Tyriar added a commit to microsoft/vscode-docs that referenced this pull request Dec 16, 2022
@Tyriar Tyriar merged commit 3247d9c into microsoft:main Dec 16, 2022
gregvanl pushed a commit to microsoft/vscode-docs that referenced this pull request Dec 16, 2022
* Update fish shell integration support

See microsoft/vscode#168211

* Update shells to headers so they get anchors

* Use bold rather than H4s

Co-authored-by: Greg Van Liew <gregvanl@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support fish shell integration automatic injection
4 participants