Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3-cmds
Commits
a55e1114
Commit
a55e1114
authored
Mar 22, 2019
by
Łukasz Magiera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Hidden option here
parent
29b6e778
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
cli/parse.go
cli/parse.go
+1
-1
opts.go
opts.go
+3
-0
No files found.
cli/parse.go
View file @
a55e1114
...
@@ -69,7 +69,7 @@ func Parse(ctx context.Context, input []string, stdin *os.File, root *cmds.Comma
...
@@ -69,7 +69,7 @@ func Parse(ctx context.Context, input []string, stdin *os.File, root *cmds.Comma
}
}
func
isHidden
(
req
*
cmds
.
Request
)
bool
{
func
isHidden
(
req
*
cmds
.
Request
)
bool
{
h
,
ok
:=
req
.
Options
[
"h
idden
"
]
.
(
bool
)
h
,
ok
:=
req
.
Options
[
cmds
.
H
idden
]
.
(
bool
)
return
h
&&
ok
return
h
&&
ok
}
}
...
...
opts.go
View file @
a55e1114
...
@@ -16,6 +16,8 @@ const (
...
@@ -16,6 +16,8 @@ const (
OptLongHelp
=
"help"
OptLongHelp
=
"help"
DerefLong
=
"dereference-args"
DerefLong
=
"dereference-args"
StdinName
=
"stdin-name"
StdinName
=
"stdin-name"
Hidden
=
"hidden"
HiddenShort
=
"H"
)
)
// options that are used by this package
// options that are used by this package
...
@@ -25,3 +27,4 @@ var OptionStreamChannels = cmdkit.BoolOption(ChanOpt, "Stream channel output")
...
@@ -25,3 +27,4 @@ var OptionStreamChannels = cmdkit.BoolOption(ChanOpt, "Stream channel output")
var
OptionTimeout
=
cmdkit
.
StringOption
(
TimeoutOpt
,
"Set a global timeout on the command"
)
var
OptionTimeout
=
cmdkit
.
StringOption
(
TimeoutOpt
,
"Set a global timeout on the command"
)
var
OptionDerefArgs
=
cmdkit
.
BoolOption
(
DerefLong
,
"Symlinks supplied in arguments are dereferenced"
)
var
OptionDerefArgs
=
cmdkit
.
BoolOption
(
DerefLong
,
"Symlinks supplied in arguments are dereferenced"
)
var
OptionStdinName
=
cmdkit
.
StringOption
(
StdinName
,
"Assign a name if the file source is stdin."
)
var
OptionStdinName
=
cmdkit
.
StringOption
(
StdinName
,
"Assign a name if the file source is stdin."
)
var
OptionHidden
=
cmdkit
.
BoolOption
(
Hidden
,
HiddenShort
,
"Include files that are hidden. Only takes effect on recursive add."
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment