zsh-workers
 help / color / mirror / Atom feed
* PATCH: update completions for procps 3.3.16
@ 2021-02-07  1:48 Oliver Kiddle
  2021-02-08  7:55 ` Daniel Shahaf
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Kiddle @ 2021-02-07  1:48 UTC (permalink / raw)
  To: Zsh workers

On Linux procps covers a number of fairly standard process related
utilities. Updating this to 3.3.16 affects a few of them - w, vmstat,
pgrep and free.

I'm not keen on tracking these versions in comments in the completion
files themself because updating the comment everytime there's a new
release that doesn't add options would get silly.

Oliver

diff --git a/Completion/Linux/Command/_free b/Completion/Linux/Command/_free
index cc5bcf3bd..6d74e4a0d 100644
--- a/Completion/Linux/Command/_free
+++ b/Completion/Linux/Command/_free
@@ -1,5 +1,4 @@
 #compdef free
-# based on procps-ng-3.3.15
 
 _arguments -s \
   '(-l --lohi)'{-l,--lohi}'[show detailed low and high memory statistics]' \
@@ -7,6 +6,7 @@ _arguments -s \
   '(-w --wide)'{-w,--wide}'[wide mode]' \
   '(-s --seconds)'{-s,--seconds}'[specify the delay between display]:seconds: ' \
   '(-c --count)'{-c+,--count=}'[specify the display count]:count: ' \
+  '(-C --full-cache)'{-C,--full-cache}'[add further cache lines to main cache]' \
   '--si[use power of 1000 instead of power of 1024]' \
   '(-)--help[print help and exit]' \
   '(-)'{-V,--version}'[print version information and exit]' \
diff --git a/Completion/Unix/Command/_pgrep b/Completion/Unix/Command/_pgrep
index 49184307f..51a4883df 100644
--- a/Completion/Unix/Command/_pgrep
+++ b/Completion/Unix/Command/_pgrep
@@ -33,6 +33,7 @@ arguments=(
   '(-o -n --oldest --newest)'{-o,--oldest}'[match oldest process]'
   '(-P --parent)'{-P+,--parent=}'[match only on specified parent process IDs]: :->ppid'
   '(-l)-q[suppress normal output]'
+  '(-r --runstates)'{-r+,--runstates}'[match runstates]:run state:compadd -S "" D I R S T t W X Z'
   '-S[search also in system processes (kernel threads)]'
   '(-s --session)'{-s+,--session=}'[match only on specified process session IDs]: :->sid'
   # _signals is OK here - we do it differently below
@@ -61,7 +62,7 @@ arguments=(
 case $OSTYPE in
   linux*)
     # Note: We deliberately exclude -v but not --inverse from pkill
-    pgopts=acdFfGghLlnoPstUuVvwx-
+    pgopts=acdFfGghLlnoPrstUuVvwx-
     pkopts=ceFfGghLnoPstUuVx-
     arguments=(
       ${arguments:#((#s)|*\))(\*|)-[acl]*}
diff --git a/Completion/Unix/Command/_vmstat b/Completion/Unix/Command/_vmstat
index f3ac1af14..e05bc88bc 100644
--- a/Completion/Unix/Command/_vmstat
+++ b/Completion/Unix/Command/_vmstat
@@ -8,6 +8,7 @@ case $OSTYPE in
       '(-t --timestamp)'{-t,--timestamp}'[show timestamp]'
       '(-n --one-header)'{-n,--one-header}'[do not redisplay header]'
       '(-S --unit)'{-S+,--unit=}'[specify unit for displayed sizes]:unit prefix [K]:((k\:1000 K\:1024 m\:1000000 M\:1048576))'
+      '(-C --full-cache)'{-C,--full-cache}'[add further cache lines to main cache]'
       '1: :_guard "[0-9]#" "interval (seconds)"' '2:count'
       + '(action)' \
       '(- :)'{-h,--help}'[display help information]'
diff --git a/Completion/Unix/Command/_w b/Completion/Unix/Command/_w
index 8fb4154c7..69751c5e5 100644
--- a/Completion/Unix/Command/_w
+++ b/Completion/Unix/Command/_w
@@ -11,6 +11,7 @@ case $OSTYPE in
       '(H -o --old-style -s --short)'{-o,--old-style}'[old style output format]'
       '(H -s --short -o --old-style)'{-s,--short}'[use short output format]'
       '(H -u --no-current)'{-u,--no-current}'[ignore the username while figuring out the current process and cpu times]'
+      '(H -n --no-truncat)'{-n,--no-truncat}'[non-truncated listing (large)]'
       + H
       '(-)--help[display help information]'
       '(-)'{-V,--version}'[display version information]'


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: update completions for procps 3.3.16
  2021-02-07  1:48 PATCH: update completions for procps 3.3.16 Oliver Kiddle
@ 2021-02-08  7:55 ` Daniel Shahaf
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Shahaf @ 2021-02-08  7:55 UTC (permalink / raw)
  To: zsh-workers

Oliver Kiddle wrote on Sun, 07 Feb 2021 01:48 +00:00:
> I'm not keen on tracking these versions in comments in the completion
> files themself because updating the comment everytime there's a new
> release that doesn't add options would get silly.

I don't see the problem.  If you review procps 3.3.17 and find that it
_doesn't_ add new options, that'd be useful information to share with
other maintainers of the procps completion, so as to avoid duplication
of work.

Right there at the top of the file seems like the best place for the
version number datum, because that way there is no atomicity problem
when updating the completion.  Recording that datum in the log message,
as this patch does, means there's no way to update the datum without
making a dummy change to the file (Git's data model can't represent
"Commit X touched ./foo but didn't change it").

The usual argument against churn is that any change risks causing
a regression or disrupting future git-blame(1) or git-bisect(1) work.
These concerns don't seem to apply to version number comments.

All that said, you're doing the work so it's your decision.

Cheers,

Daniel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-08  7:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-07  1:48 PATCH: update completions for procps 3.3.16 Oliver Kiddle
2021-02-08  7:55 ` Daniel Shahaf

zsh-workers

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-workers

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-workers zsh-workers/ http://inbox.vuxu.org/zsh-workers \
		zsh-workers@zsh.org
	public-inbox-index zsh-workers

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git