Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: adding mkdir to _store_cache



On Sep 11,  3:14pm, DervishD wrote:
} Subject: Re: adding mkdir to _store_cache
} 
} >> "mkdir -p" is not universally supported.
} >I thought modern versions of *nix had the "-p" flag.
} 
}     The Single Unix Specification v3 specify it, and GNU fileutils
} (version 4.1, which is what I have) supports it.

It occurs to me that possibly the most obvious solution is

    (zmodload zsh/files 2>/dev/null; mkdir -p ...)

[Directed to /dev/null rather than used -i because "already loaded" is
not the only possible error to be ignored.]

Now that module builtins are not automatically loaded when the module is
compiled into the binary, we could change the default config.modules line
for the files (and possibly also stat, net/socket, and zftp) modules to
cause them to be linked to static builds.  Then the above subshell trick
would give us nearly-guaranteed access to necessary functionality.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author