fish: conf/setup: Set XDG base directory environment variables

This commit is contained in:
Sanchayan Maity 2022-01-12 17:39:10 +05:30
parent 4d978c02f6
commit ef84036ec3
1 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,9 @@
function __fish_setup_on_tty_login --description "Set up environment on tty login"
set -qx XDG_CONFIG_HOME; or set -Ux XDG_CONFIG_HOME $HOME/.config
set -qx XDG_CACHE_HOME; or set -Ux XDG_CACHE_HOME $HOME/.cache
set -qx XDG_DATA_HOME; or set -Ux XDG_DATA_HOME $HOME/.local/share
set -qx XDG_STATE_HOME; or set -Ux XDG_STATE_HOME $HOME/.local/state
for extra_path in ~/.{local,nix-profile,cargo,cabal,ghcup}/bin
if test -d "$extra_path"
set -gxp PATH "$extra_path"