oh-my-fish/pkg/omf/util/omf.util_mkdir.fish
Bruno Pinto 20ed43983b Naming functions with omf. namespace.
Having a clear namespace `omf.` improves the readability of the code as
we clarify what is the function name and what is the namespace.
2015-08-28 18:24:56 +09:00

11 lines
220 B
Fish

function omf.util_mkdir -a name
set -l name "$argv[1]"
if test -d "$OMF_CONFIG"
set name "$OMF_CONFIG/$name"
else if test -d "$OMF_PATH"
set name "$OMF_PATH/$name"
end
mkdir -p "$name"
echo $name
end