mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 22:11:54 +02:00
53898: update _pmap, _date, _pgrep, _sysctl
_pmap is moved from Linux/Command/ to Unix/Command
This commit is contained in:
parent
7d4fc84519
commit
dff057259d
6 changed files with 62 additions and 27 deletions
|
@ -1,3 +1,10 @@
|
|||
2025-09-01 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||
|
||||
* 53898: Completion/Unix/Command/_date,
|
||||
Completion/Unix/Command/_pgrep, Completion/Unix/Command/_pmap
|
||||
Completion/Unix/Command/_sysctl: update a few completers.
|
||||
_pmap is moved from Linux/Command/ to Unix/Command/.
|
||||
|
||||
2025-08-28 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||
|
||||
* 53866: Completion/Unix/Command/_man: fix _man for NetBSD
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
#compdef pmap
|
||||
# based on procps-ng-3.3.15
|
||||
|
||||
_arguments -s \
|
||||
'(exit -A --range)'{-A+,--range}'[limit results to the specified address range]:low,high: ' \
|
||||
'(exit -q --quiet)'{-q,--quiet}'[do not display some header or footer lines]' \
|
||||
'(exit -p --show-path)'{-p,--show-path}'[show full path to files in the mapping column]' \
|
||||
'(exit)*: :_pids' \
|
||||
+ '(format)' \
|
||||
'(exit)'{-d,--device}'[show the device format]' \
|
||||
'(exit)'{-x,--extended}'[show the extended format]' \
|
||||
'(exit)-X[show even more details than -x option]' \
|
||||
'(exit)-XX[show everything the kernel provides]' \
|
||||
'(exit)'{-c,--read-rc}'[read the default configuration]' \
|
||||
'(exit)'{-C+,--read-rc-from=}'[read the configuration from the specified file]: :_files' \
|
||||
+ '(exit)' \
|
||||
'(- *)'{-n,--create-rc}'[create new default configuration and exit]' \
|
||||
'(- *)'{-N+,--create-rc-to=}'[create new configuration to the specified file and exit]: :_files' \
|
||||
'(- *)'{-h,--help}'[display help text and exit]' \
|
||||
'(- *)'{-V,--version}'[display version information and exit]'
|
|
@ -32,6 +32,7 @@ else
|
|||
freebsd*|dragonfly*|darwin*|netbsd*|openbsd*)
|
||||
opts+=( -A '-*' )
|
||||
args+=(
|
||||
'-f+[use specified format for input]:parsing format:_date_formats:new date'
|
||||
"-j[don't try to set date]"
|
||||
'2:format or date:->fmt_date'
|
||||
)
|
||||
|
@ -42,11 +43,6 @@ else
|
|||
'-R[display in RFC2822 format]'
|
||||
)
|
||||
;|
|
||||
freebsd*|dragonfly*|darwin*|openbsd*)
|
||||
args+=(
|
||||
'-f+[use specified format for input]:parsing format:_date_formats:new date'
|
||||
)
|
||||
;|
|
||||
dragonfly*|netbsd*|openbsd*)
|
||||
args+=(
|
||||
'-r+[output date specified by reference time]:seconds since epoch'
|
||||
|
|
|
@ -86,6 +86,10 @@ case $OSTYPE in
|
|||
pgopts=dfGglnoPqsTtUuvx
|
||||
pkopts=fGgIlnoPqsTtUuvx
|
||||
;;
|
||||
netbsd*)
|
||||
pgopts=dfGgilnPqstUuvx
|
||||
pkopts=fGgilnPstUuvx
|
||||
;;
|
||||
darwin*)
|
||||
pgopts=adFfGgiLlnoPqtUuvx
|
||||
pkopts=aFfGgIiLlnoPtUuvx
|
||||
|
|
44
Completion/Unix/Command/_pmap
Normal file
44
Completion/Unix/Command/_pmap
Normal file
|
@ -0,0 +1,44 @@
|
|||
#compdef pmap
|
||||
|
||||
if _pick_variant procps=procps-ng unix -V 2>/dev/null; then
|
||||
# based on procps-ng-3.3.15
|
||||
_arguments -s \
|
||||
'(exit -A --range)'{-A+,--range}'[limit results to the specified address range]:low,high: ' \
|
||||
'(exit -q --quiet)'{-q,--quiet}'[do not display some header or footer lines]' \
|
||||
'(exit -p --show-path)'{-p,--show-path}'[show full path to files in the mapping column]' \
|
||||
'(exit)*: :_pids' \
|
||||
+ '(format)' \
|
||||
'(exit)'{-d,--device}'[show the device format]' \
|
||||
'(exit)'{-x,--extended}'[show the extended format]' \
|
||||
'(exit)-X[show even more details than -x option]' \
|
||||
'(exit)-XX[show everything the kernel provides]' \
|
||||
'(exit)'{-c,--read-rc}'[read the default configuration]' \
|
||||
'(exit)'{-C+,--read-rc-from=}'[read the configuration from the specified file]: :_files' \
|
||||
+ '(exit)' \
|
||||
'(- *)'{-n,--create-rc}'[create new default configuration and exit]' \
|
||||
'(- *)'{-N+,--create-rc-to=}'[create new configuration to the specified file and exit]: :_files' \
|
||||
'(- *)'{-h,--help}'[display help text and exit]' \
|
||||
'(- *)'{-V,--version}'[display version information and exit]'
|
||||
elif [[ $OSTYPE = netbsd* ]]; then
|
||||
_arguments -s \
|
||||
'(-E -S -V)-A[dump vm_amap structure found at the specified address]:address:' \
|
||||
"-a[display all information from the process's memory map]" \
|
||||
'-D[enable version debug facilities]:bitmask:' \
|
||||
'-d[dump vm_map and vm_map_entry in a style like ddb(4)]' \
|
||||
'(-A -S -V)-E[dump vm_map_entry structure found at the specified address]:address:' \
|
||||
'-l[dump information in a format like Linux /proc file system]' \
|
||||
'(-N)-M[extract values associated with the name list from the specified core]:core:' \
|
||||
'-m[dump information in the same format as the map pseudo-file in /proc]' \
|
||||
'(-M)-N[extract the name list from the specified system]:system:' \
|
||||
'(-p)-P[print information about pmap itself]' \
|
||||
'(-P)-p[print information about the specified process]: :_pids' \
|
||||
'-R[recurse into submaps]' \
|
||||
'(-A -E -V)-S[dump vmspace structure found at the specified address]:address:' \
|
||||
'-s[Solaris style output format (default)]' \
|
||||
'-t[print entries to the underlying RB tree]' \
|
||||
'(-A -E -S)-V[dump vm_map structure found at the specified address]:address:' \
|
||||
'-v[verbose output]' \
|
||||
'*:pid:_pids'
|
||||
else
|
||||
_default
|
||||
fi
|
|
@ -39,7 +39,10 @@ case $OSTYPE in
|
|||
freebsd<14->.*)
|
||||
args+=(
|
||||
'-F[print the format of the variable]'
|
||||
'-J[display only jail prison sysctl variables]'
|
||||
'-j[perform the actions inside the specified jail]:jail id or name:'
|
||||
'(-N)-l[show the length of variables along with their values]'
|
||||
'-V[display only VNET sysctl variables]'
|
||||
)
|
||||
;|
|
||||
freebsd<11->.*)
|
||||
|
@ -79,8 +82,9 @@ case $OSTYPE in
|
|||
sysctlvars=( ${${${(f)"$(_call_program sysctl-variables
|
||||
sysctl -a 2>/dev/null)"}%%=*}:# *} )
|
||||
_arguments -S -s -A "-*" \
|
||||
'(-A -q *)-a[list all string and integer variables]' \
|
||||
'(-a -q *)-A[list all known variables]' \
|
||||
'(-A -f -q *)-a[list all string and integer variables]' \
|
||||
'(-a -f -q *)-A[list all known variables]' \
|
||||
'(-A -a *)-f[read name=value from specified file]: :_files' \
|
||||
'-n[show only values]' \
|
||||
'(-a -A)-q[suppress all output when setting a variable]' \
|
||||
'*:sysctl variable:_multi_parts -i -S = -q . sysctlvars'
|
||||
|
|
Loading…
Reference in a new issue