zsh-workers
 help / color / mirror / code / Atom feed
* [patch] minor patch to remove duplicates
@ 2016-11-29  6:53 Eitan Adler
  2016-12-07 12:08 ` Daniel Shahaf
  0 siblings, 1 reply; 3+ messages in thread
From: Eitan Adler @ 2016-11-29  6:53 UTC (permalink / raw)
  To: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 248 bytes --]

I was exploring zsh code for reasons that aren't pertinent and I
figured that this patch might be appreciated. It removes many
duplicated words in the code base and fixes a few grammar/spelling
errors.

(please CC me on replies)



-- 
Eitan Adler

[-- Attachment #2: 0001-remove-most-most-of-the-duplicates.patch --]
[-- Type: application/octet-stream, Size: 11274 bytes --]

From 00df3d6768fc427f4ee77cb4dd91318c15fa5977 Mon Sep 17 00:00:00 2001
From: Eitan Adler <lists@eitanadler.com>
Date: Mon, 28 Nov 2016 22:43:56 -0800
Subject: [PATCH] remove most most of the duplicates

Signed-off-by: Eitan Adler <lists@eitanadler.com>
---
 ChangeLog                          | 4 ++--
 Completion/Base/Utility/_arguments | 2 +-
 Completion/Unix/Command/_git       | 2 +-
 Completion/Unix/Type/_zfs_dataset  | 2 +-
 Completion/Zsh/Command/_zstyle     | 2 +-
 Completion/Zsh/Function/_zargs     | 2 +-
 Doc/Zsh/builtins.yo                | 2 +-
 Doc/Zsh/compsys.yo                 | 4 ++--
 Doc/Zsh/contrib.yo                 | 2 +-
 Etc/ChangeLog-4.3                  | 2 +-
 Src/Zle/zle_refresh.c              | 2 +-
 Src/glob.c                         | 2 +-
 Src/hist.c                         | 2 +-
 Src/input.c                        | 2 +-
 Src/subst.c                        | 2 +-
 Src/zsh.h                          | 2 +-
 Util/helpfiles                     | 2 +-
 17 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a70ead6..a5e118b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3440,7 +3440,7 @@
 
 2015-09-28  Barton E. Schaefer  <schaefer@zsh.org>
 
-	* 36669: Src/lex.c: fix ${(z)...} of an an incomplete math
+	* 36669: Src/lex.c: fix ${(z)...} of an incomplete math
 	expression by restoring "((" at the front of the token
 
 2015-09-28  Daniel Shahaf  <d.s@daniel.shahaf.name>
@@ -9434,7 +9434,7 @@
 2013-07-20  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 31545: Src/exec.c, Src/parse.c: if FD_CLOEXEC is available,
-	so mark dump file file descriptors, avoiding possible
+	so mark dump file descriptors, avoiding possible
 	multiple use of file descriptors.
 
 2013-07-19  Peter Stephenson  <p.w.stephenson@ntlworld.com>
diff --git a/Completion/Base/Utility/_arguments b/Completion/Base/Utility/_arguments
index 82c9696..d2c0d33 100644
--- a/Completion/Base/Utility/_arguments
+++ b/Completion/Base/Utility/_arguments
@@ -105,7 +105,7 @@ if (( long )); then
 	 continue
        else
 	 # Still no comment, add the previous options anyway.
-         # Add a ':' after the option anyways, to make the the matching of
+         # Add a ':' after the option anyways, to make the matching of
          # the options lateron work as intended.
          # It will be removed again later.
 	 lopts+=("${^tmp[@]}":)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 8fdca28..7990b99 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -6114,7 +6114,7 @@ __git_recent_branches() {
   local -aU valid_ref_names_munged=( ${"${(f)"$(_call_program valid-ref-names 'git for-each-ref --format="%(refname)" refs/heads/')"}"#refs/heads/} )
 
   # 1. Obtain names of recently-checked-out branches from the reflog.
-  # 2. Remove ref names that that no longer exist from the list.
+  # 2. Remove ref names that no longer exist from the list.
   #    (We must do this because #3 would otherwise croak on them.)
   __git_recent_branches__names; branches=( ${(@)reply:*valid_ref_names_munged} )
 
diff --git a/Completion/Unix/Type/_zfs_dataset b/Completion/Unix/Type/_zfs_dataset
index 6c625e9..6bef04e 100644
--- a/Completion/Unix/Type/_zfs_dataset
+++ b/Completion/Unix/Type/_zfs_dataset
@@ -4,7 +4,7 @@ local -a type expl_type_arr rsrc rdst paths_allowed
 local -a typearg datasetlist expl mlist
 local expl_type
 
-# -e takes an argument which is passed as as the "descr" argument to _wanted
+# -e takes an argument which is passed as the "descr" argument to _wanted
 # -p indicates that filesystem paths, not just dataset names, are allowed
 # -r1 indicates that we're completing the source of a rename
 # -r2 indicates that we're completing the destination of a rename
diff --git a/Completion/Zsh/Command/_zstyle b/Completion/Zsh/Command/_zstyle
index d6f2852..0e82822 100644
--- a/Completion/Zsh/Command/_zstyle
+++ b/Completion/Zsh/Command/_zstyle
@@ -266,7 +266,7 @@ while (( $#state )); do
       _wanted contexts expl "$state_descr" compadd -a patterns
       ;;
 
-    # 'metapatterns': patterns that are are matched not against contexts, but
+    # 'metapatterns': patterns that are matched not against contexts, but
     # against patterns.
     (metapatterns)
       zstyle -g patterns
diff --git a/Completion/Zsh/Function/_zargs b/Completion/Zsh/Function/_zargs
index c24b276..f974ab6 100644
--- a/Completion/Zsh/Function/_zargs
+++ b/Completion/Zsh/Function/_zargs
@@ -4,7 +4,7 @@ local arguments eofstr pos=$((CURRENT)) numeofs=0 ret=1 cmdpos=1
 
 #this doesn't handle '--' on the command line, only --
 #it also by extension doesn't handle eofstr being the empty string
-#it also also doesn't handle eofstr being -e or --eof, and everything will
+#it also doesn't handle eofstr being -e or --eof, and everything will
 # probably also be confused if the command at the end takes a -e, --eof= or --
 eofstr=${${${${words[(r)(--eof=*|-e*)]}#--eof=}#-e}:---}
 while {
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index 169a31e..7b04d06 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -570,7 +570,7 @@ with emulations to be set to their values in tt(sh).  tt(fno) then
 calls tt(fni); because tt(fni) is also marked for sticky tt(sh)
 emulation, no option changes take place on entry to or exit from it.
 Hence the option tt(cshnullglob), turned off by tt(sh) emulation, will
-be turned on within tt(fni) and remain on on return to tt(fno).  On exit
+be turned on within tt(fni) and remain on return to tt(fno).  On exit
 from tt(fno), the emulation mode and all options will be restored to the
 state they were in before entry to the temporary emulation.
 
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index ceb98c7..60ef9ee 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -144,8 +144,8 @@ directory mentioned in the tt(fpath) parameter, and should be autoloaded
 few utility functions, arrange for all the necessary shell functions to be
 autoloaded, and will then re-define all widgets that do completion to use the
 new system.  If you use the tt(menu-select) widget, which is part of the
-tt(zsh/complist) module, you should make sure that that module is loaded
-before the call to tt(compinit) so that that widget is also
+tt(zsh/complist) module, you should make sure that the module is loaded
+before the call to tt(compinit) so that the widget is also
 re-defined.  If completion styles (see below) are set up to perform
 expansion as well as completion by default, and the TAB key is bound to
 tt(expand-or-complete), tt(compinit) will rebind it to tt(complete-word);
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index 6235072..f764eb7 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -3854,7 +3854,7 @@ The expression tt(<) followed (with no space) by a shell identifier
 causes the value of the variable with that name to be pushed
 onto the stack.  var(ident) may be an integer, in which
 case the previous result with that number (as shown before
-the tt(>) in th standard standard tt(zcalc) prompt) is put on the stack.
+the tt(>) in the standard tt(zcalc) prompt) is put on the stack.
 )
 item(Exchange: tt(xy))(
 The pseudo-function tt(xy) causes the most recent two elements of
diff --git a/Etc/ChangeLog-4.3 b/Etc/ChangeLog-4.3
index 1be618b..6d85e40 100644
--- a/Etc/ChangeLog-4.3
+++ b/Etc/ChangeLog-4.3
@@ -1182,7 +1182,7 @@
 
 2011-08-16  Wayne Davison  <wayned@users.sourceforge.net>
 
-	* 29650: Src/jobs.c: don't lose the the time info after a
+	* 29650: Src/jobs.c: don't lose the time info after a
 	suspend+restore.
 
 2011-08-15  Peter Stephenson  <p.w.stephenson@ntlworld.com>
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index e78f1e5..8d173cd 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -946,7 +946,7 @@ addmultiword(REFRESH_ELEMENT *base, ZLE_STRING_T tptr, int ichars)
 
 /*
  * Swap the old and new video buffers, plus any associated multiword
- * buffers.  The new buffer becomes the old one; the new new buffer
+ * buffers.  The new buffer becomes the old one; the new buffer
  * will be filled with the command line next time.
  */
 static void
diff --git a/Src/glob.c b/Src/glob.c
index 33bf2ae..623e6f1 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -1174,7 +1174,7 @@ checkglobqual(char *str, int sl, int nobareglob, char **sp)
 }
 
 /* Main entry point to the globbing code for filename globbing. *
- * np points to a node in the list list which will be expanded  *
+ * np points to a node in the list which will be expanded  *
  * into a series of nodes.                                      */
 
 /**/
diff --git a/Src/hist.c b/Src/hist.c
index 5be7d25..97fd340 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -1038,7 +1038,7 @@ hbegin(int dohist)
     /*
      * pws: We used to test for "|| (inbufflags & INP_ALIAS)"
      * in this test, but at this point we don't have input
-     * set up up so this can trigger unnecessarily.
+     * set up so this can trigger unnecessarily.
      * I don't see how the test at this point could ever be
      * useful, since we only get here when we're initialising
      * the history mechanism, before we've done any input.
diff --git a/Src/input.c b/Src/input.c
index eb968ea..fe94b8e 100644
--- a/Src/input.c
+++ b/Src/input.c
@@ -51,7 +51,7 @@
  * Note that the input string is itself used as the input buffer: it is not
  * copied, nor is it every written back to, so using a constant string
  * should work.  Consequently, when passing areas of memory from the heap
- * it is necessary that that heap last as long as the operation of reading
+ * it is necessary that the heap last as long as the operation of reading
  * the string.  After the string is read, the stack should be popped with
  * inpop(), which effectively flushes any unread input as well as restoring
  * the previous input state.
diff --git a/Src/subst.c b/Src/subst.c
index c7c5522..a26ebb1 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -2368,7 +2368,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags,
 	 * This is the inner handling for the case referred to above
 	 * where we have something like ${${(P)name}...}.
 	 *
-	 * Treat this as as a normal value here; all transformations on
+	 * Treat this as a normal value here; all transformations on
 	 * result are in outer instance.
 	 */
 	aspar = 0;
diff --git a/Src/zsh.h b/Src/zsh.h
index a5d4455..63cada8 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -1589,7 +1589,7 @@ struct zpc_disables_save {
     /*
      * Bit vector of ZPC_COUNT disabled characters.
      * We'll live dangerously and assumed ZPC_COUNT is no greater
-     * than the number of bits an an unsigned int.
+     * than the number of bits an unsigned int.
      */
     unsigned int disables;
 };
diff --git a/Util/helpfiles b/Util/helpfiles
index 699ca83..9e837fe 100755
--- a/Util/helpfiles
+++ b/Util/helpfiles
@@ -19,7 +19,7 @@
 # This script is called automatically during `make install'
 # unless specified otherwise.
 
-# For usage and and more information see zshcontrib(1).
+# For usage and more information see zshcontrib(1).
 
 sub Usage {
     print(STDERR "Usage: helpfiles zshbuiltins.1 dest-dir [link-file]\n");
-- 
2.10.2


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

* Re: [patch] minor patch to remove duplicates
  2016-11-29  6:53 [patch] minor patch to remove duplicates Eitan Adler
@ 2016-12-07 12:08 ` Daniel Shahaf
  2016-12-07 12:45   ` Oliver Kiddle
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Shahaf @ 2016-12-07 12:08 UTC (permalink / raw)
  To: Eitan Adler; +Cc: Zsh hackers list

Eitan Adler wrote on Mon, Nov 28, 2016 at 22:53:24 -0800:
> +++ b/Src/input.c
> @@ -51,7 +51,7 @@
>   * Note that the input string is itself used as the input buffer: it is not
>   * copied, nor is it every written back to, so using a constant string
>   * should work.  Consequently, when passing areas of memory from the heap
> - * it is necessary that that heap last as long as the operation of reading
> + * it is necessary that the heap last as long as the operation of reading

The patch changed the meaning of this sentence.  Wasn't the sentence
more accurate before the patch?

(To be clear — the sentence was grammatical not only after but also
before the patch.)

>   * the string.  After the string is read, the stack should be popped with
>   * inpop(), which effectively flushes any unread input as well as restoring
>   * the previous input state.


> +++ b/Doc/Zsh/compsys.yo
> @@ -144,8 +144,8 @@ directory mentioned in the tt(fpath) parameter, and should be autoloaded
>  few utility functions, arrange for all the necessary shell functions to be
>  autoloaded, and will then re-define all widgets that do completion to use the
>  new system.  If you use the tt(menu-select) widget, which is part of the
> -tt(zsh/complist) module, you should make sure that that module is loaded
> -before the call to tt(compinit) so that that widget is also
> +tt(zsh/complist) module, you should make sure that the module is loaded
> +before the call to tt(compinit) so that the widget is also
>  re-defined.  If completion styles (see below) are set up to perform
>  expansion as well as completion by default, and the TAB key is bound to
>  tt(expand-or-complete), tt(compinit) will rebind it to tt(complete-word);

Cheers,

Daniel


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

* Re: [patch] minor patch to remove duplicates
  2016-12-07 12:08 ` Daniel Shahaf
@ 2016-12-07 12:45   ` Oliver Kiddle
  0 siblings, 0 replies; 3+ messages in thread
From: Oliver Kiddle @ 2016-12-07 12:45 UTC (permalink / raw)
  To: Eitan Adler, Zsh hackers list

Daniel Shahaf wrote:
> The patch changed the meaning of this sentence.  Wasn't the sentence
> more accurate before the patch?

Prompted by this, I had a closer look and the following is also not
the right fix:

--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -1589,7 +1589,7 @@ struct zpc_disables_save {
     /*
      * Bit vector of ZPC_COUNT disabled characters.
      * We'll live dangerously and assumed ZPC_COUNT is no greater
-     * than the number of bits an an unsigned int.
+     * than the number of bits an unsigned int.

The original intention was probably "in an".

Oliver


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

end of thread, other threads:[~2016-12-07 12:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-29  6:53 [patch] minor patch to remove duplicates Eitan Adler
2016-12-07 12:08 ` Daniel Shahaf
2016-12-07 12:45   ` Oliver Kiddle

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).