zpmod
b19981f
High-performance Zsh module for script optimization and filesystem helpers
|
Intercepts .
and source
to:
.zwc
compiled form (via zcompile logic)zpmod source-study
Errors follow standard zsh source semantics.
Primary entrypoint with subcommands:
Flags:
-h
show usage-V
show versionSubcommands:
report-append
– append body text to ZI_REPORTS[plugin-ID]
source-study
– print profile table (use -l for full paths)Return codes:
Bash-like record reader into indexed arrays.
Synopsis:
Batch file metadata lookup.
Synopsis:
Options:
-L
follow symlinks (use stat
instead of lstat
)-f
limit output to a comma-separated subset of fieldsFields:
type
(f=regular file, d=directory, l=symlink)size
(bytes)mode
(octal, 0000-07777)mtime
(epoch seconds)uid
, gid
(numeric owners)ino
(inode number)nlink
(hard link count)Output format: one line per path like path=/tmp/x,type=f,size=12,mode=644,mtime=1700000000,uid=1000,gid=1000,ino=123,nlink=1,errno=0
.
errno
is non-zero on error and type/size/...
may be omitted depending on fields selected or errors.
Fast directory listing.
Synopsis:
Options:
-a
include dotfiles (default: skip .
-prefixed)-d
only directories-f
only regular filesWrites names (not paths) into array
.
Fast file reader into scalar or array.
Synopsis:
Behavior:
var
is a scalar, the entire contents are stored (no splitting)var
is an array, contents are split on the delimiter: -d <delim>
or -0
(NUL)-m
may use mmap
when availableDelimiter escapes accepted with -d
: \n
, \r
, \t
, \0
.
Notes:
\r
, a \r\n
sequence is treated as a single record separator (CRLF).a\nb\n
with -d "\n"
yields ("a" "b")
).