Skip to content

Commit

Permalink
Recognize net use /d.
Browse files Browse the repository at this point in the history
The `net use` completions recognize /d, /u:, /p:yes, and /p:no but
these flags are hidden when listing completions.
  • Loading branch information
chrisant996 committed Dec 10, 2023
1 parent 4b0cfac commit df3bbb4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions net.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ else
time_parser = flags("/domain", "/rtsdomain", "/set", "/?")
end

local use_flags = flags("/user:", "/u:", "/smartcard", "/savecred", "/delete", "/d",
"/persistent:yes", "/p:yes", "/persistent:no", "/p:no")
if use_flags.hideflags then
use_flags:hideflags("/u:", "/d", "/p:yes", "/p:no")
end

local net_table =
{
"accounts" .. flags("/forcelogoff:", "/forcelogoff:no", "/domain",
Expand All @@ -63,8 +69,7 @@ local net_table =
"statistics" .. args("server", "workstation"),
"stop" .. helpflag,
"time" .. time_parser,
"use" .. flags("/user:", "/smartcard", "/savecred", "/delete",
"/persistent:yes", "/persistent:no"),
"use" .. use_flags,
"user" .. helpflag,
"view" .. flags("/cache", "/all", "/domain")
}
Expand Down

0 comments on commit df3bbb4

Please sign in to comment.