mirror of https://github.com/jorgebucaran/fisher
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
630 B
Fish
26 lines
630 B
Fish
function __fisher_xdg -a dir
|
|
set -l config $HOME/.config
|
|
set -l data $HOME/.local/share
|
|
set -l cache $HOME/.cache
|
|
|
|
switch "$dir"
|
|
case --config{,-home}
|
|
if set -q XDG_CONFIG_HOME
|
|
set config $XDG_CONFIG_HOME
|
|
end
|
|
printf "%s\n" $config
|
|
|
|
case --data{,-home}
|
|
if set -q XDG_DATA_HOME
|
|
set data $XDG_DATA_HOME
|
|
end
|
|
printf "%s\n" $data
|
|
|
|
case --cache{,-home}
|
|
if set -q XDG_CACHE_HOME
|
|
set cache $XDG_CACHE_HOME
|
|
end
|
|
printf "%s\n" $cache
|
|
end
|
|
end
|