2e9256a567
This will allow creating modules that contain only externally generated files. For example, this is how I currently use it to generate modules for code that is supposed to be eval'ed: zmodule-eval() { local -r zcommand=${${=1}[1]} ztarget=${1//[^[:alnum:]]/-}.zsh zmodule custom-${zcommand} --use mkdir --if-command ${zcommand} \ --cmd "if [[ ! {}/${ztarget} -nt \${commands[${zcommand}]} ]]; then ${1} >! {}/${ztarget}; zcompile -UR {}/${ztarget}; fi" \ --source ${ztarget} } zmodule-eval 'starship init zsh' unfunction zmodule-eval
7 lines
141 B
Plaintext
7 lines
141 B
Plaintext
_zimfw_create_dir() {
|
|
if ! ERR=$(command mkdir -p ${1} 2>&1); then
|
|
_zimfw_print_error "Error creating ${1}" ${ERR}
|
|
return 1
|
|
fi
|
|
}
|