fish-shell/share/functions/__fish_make_cache_dir.fish
Johannes Altmanninger 330883b6fd Run fish_indent on share/**.fish
This is mostly to show that some of my following indent changes don't break
current behavior.
2021-02-08 07:31:33 +01:00

9 lines
346 B
Fish

function __fish_make_cache_dir --description "Create and return XDG_CACHE_HOME"
set -l xdg_cache_home $XDG_CACHE_HOME
if test -z "$xdg_cache_home"; or string match -qv '/*' -- $xdg_cache_home; or set -q xdg_cache_home[2]
set xdg_cache_home $HOME/.cache
end
mkdir -m 700 -p $xdg_cache_home
and echo $xdg_cache_home
end