zsh-users
 help / color / mirror / code / Atom feed
* issue with usermod command completion
@ 2019-07-24  3:04 hottea
  2019-07-29 18:44 ` Eric Cook
  0 siblings, 1 reply; 2+ messages in thread
From: hottea @ 2019-07-24  3:04 UTC (permalink / raw)
  To: zsh-users

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

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

* Re: issue with usermod command completion
  2019-07-24  3:04 issue with usermod command completion hottea
@ 2019-07-29 18:44 ` Eric Cook
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Cook @ 2019-07-29 18:44 UTC (permalink / raw)
  To: zsh-users

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:*)

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

end of thread, other threads:[~2019-07-29 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24  3:04 issue with usermod command completion hottea
2019-07-29 18:44 ` Eric Cook

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).