snap: added tasks subcommand #3185

Merged
merged 4 commits into from Apr 18, 2017

Conversation

Projects
None yet
4 participants
Contributor

stolowski commented Apr 12, 2017

Added 'tasks' subcommand to snap (works as 'change') and made 'change' hidden.

I think you want to also change any hints about the "snap change NNN" that we give in some places.

stolowski added some commits Apr 12, 2017

Contributor

stolowski commented Apr 12, 2017

@zyga I found only one occurence of such hint, it's when you type 'snap changes "; I fixed that. I haven't found any others, but grepping can be deceiving; let me know if you can think of any other use case where we would show it.

zyga approved these changes Apr 13, 2017

Looks good, +1

just one nit

cmd/snap/cmd_changes.go
@@ -46,13 +46,20 @@ type cmdChanges struct {
type cmdChange struct {
Positional struct {
+ ID changeID `positional-arg-name:"<id>" required:"yes" hidden:"true"`
@chipaca

chipaca Apr 13, 2017

Member

that hidden hides the argument, but not the command

cmd/snap/cmd_changes.go
+}
+
+type cmdTasks struct {
+ Positional struct {
ID changeID `positional-arg-name:"<id>" required:"yes"`
} `positional-args:"yes"`
}
func init() {
addCommand("changes", shortChangesHelp, longChangesHelp, func() flags.Commander { return &cmdChanges{} }, nil, nil)
addCommand("change", shortChangeHelp, longChangeHelp, func() flags.Commander { return &cmdChange{} }, nil, nil)
@chipaca

chipaca Apr 13, 2017

Member

you want to add .hidden = true to the end of that (see e.g. cmd_booted.go).

@stolowski

stolowski Apr 13, 2017

Contributor

Thanks for spotting, fixed.

mvo5 approved these changes Apr 18, 2017

@mvo5 mvo5 merged commit 539497b into snapcore:master Apr 18, 2017

6 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
xenial-amd64 autopkgtest finished (success)
Details
xenial-i386 autopkgtest finished (success)
Details
xenial-ppc64el autopkgtest finished (success)
Details
yakkety-amd64 autopkgtest finished (success)
Details
zesty-amd64 autopkgtest finished (success)
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment