funcsave: Use mkdir -p

It's in POSIX, and simplifies stuff.
This commit is contained in:
Fabian Homborg 2018-10-21 15:24:38 +02:00
parent 00b1dd861e
commit 3b2be9009e

View File

@ -13,13 +13,9 @@ function funcsave --description "Save the current definition of all specified fu
set configdir $XDG_CONFIG_HOME
end
for i in $configdir $configdir/fish $configdir/fish/functions
if not test -d $i
if not command mkdir $i >/dev/null
printf (_ "%s: Could not create configuration directory\n") funcsave
return 1
end
end
if not mkdir -p $configdir/fish/functions
printf (_ "%s: Could not create configuration directory\n") funcsave
return 1
end
set -l retval 0