zsh-users
 help / color / mirror / code / Atom feed
From: Eric Cook <llua@gmx.com>
To: zsh-users@zsh.org
Subject: Re: issue with usermod command completion
Date: Mon, 29 Jul 2019 14:44:24 -0400	[thread overview]
Message-ID: <f408e23a-c048-4e9c-8b3d-acd796014974@gmx.com> (raw)
In-Reply-To: <CAE_AYmf34xsUTTMTaPh_z9EDfoWtQbdMFYdhdaiTMDhY+Rv7WA@mail.gmail.com>

On 7/23/19 11:04 PM, hottea wrote:
> Hi,
> usermode [TAB] gives me:
> usermod --add-sub-
> --add-sub-gids  -- add a range of subordinate gids
> --add-sub-uids  -- add a range of subordinate uids
>
> However, there's no --add-sub-gids or --add-sub-uids options. I think
> they're typo of --add-subgids and --add-subuids.
>
> After checking the source, a modification might be needed in these
> lines: https://github.com/zsh-users/zsh/blob/master/Completion/Unix/Command/_user_admin#L106-L109
>

seemed to have been based off of a man page at the time: http://manpages.ubuntu.com/manpages/xenial/man8/usermod.8.html
curious though, looking at the source code of the package for the same release, the option seemed to have always been --{add,del}-sub{g,u}ids.
so a typo in the documentation causing us to incorrectly add it that way. regardless


diff --git a/Completion/Unix/Command/_user_admin b/Completion/Unix/Command/_user_admin
index fe28c13f5..c7e1efc80 100644
--- a/Completion/Unix/Command/_user_admin
+++ b/Completion/Unix/Command/_user_admin
@@ -103,10 +103,10 @@ case ${service%???}:${(M)service%???}:$OSTYPE in
   user:mod:linux*)
     args+=(
       '(-a --append)'{-a,--append}'[add user to supplementary groups without removing from other groups]'
-      \*{-v,--add-sub-uids}'[add a range of subordinate uids]:uids (first-last)'
-      \*{-V,--del-sub-uids}'[remove a range of subordinate uids]:uids (first-last)'
-      \*{-w,--add-sub-gids}'[add a range of subordinate gids]:gids (first-last)'
-      \*{-W,--del-sub-gids}'[remove a range of subordinate gids]:gids (first-last)'
+      \*{-v,--add-subuids}'[add a range of subordinate uids]:uids (first-last)'
+      \*{-V,--del-subuids}'[remove a range of subordinate uids]:uids (first-last)'
+      \*{-w,--add-subgids}'[add a range of subordinate gids]:gids (first-last)'
+      \*{-W,--del-subgids}'[remove a range of subordinate gids]:gids (first-last)'
     )
   ;|
   user:mod:*)

      reply	other threads:[~2019-07-29 18:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24  3:04 hottea
2019-07-29 18:44 ` Eric Cook [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f408e23a-c048-4e9c-8b3d-acd796014974@gmx.com \
    --to=llua@gmx.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).