Skip to content

Document setting XDG_DATA_HOME, XDG_DATA_DIRS and their uses #1527

@NotTheDr01ds

Description

@NotTheDr01ds

From Nushell #13704

This is related to, but probably separate from #1526.

We need to document how to set XDG_DATA_HOME, XDG_DATA_DIRS, and what they are used for. Looking at the source, I think:

  • XDG_DATA_HOME is only used to set $nu.data-dir ($env.XDG_DATA_HOME/nushell) on startup (all-platforms)

    • Related: $nu.data-dir used to:
      • Set the "final" vendor autoload path ($nu.data-dir/vendor/autoload` that overrides all others
      • Set a default completions directory ($nu.data-dir/completions) directory in $env.NU_LIB_DIRS - Side-note: Is this still useful now that we have autoloads?
  • On Unix platforms only - nushell/vendor/autoload is appended to each directory listed in XDG_DATA_DIRS to set nu.vendor-autoload-dirs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions