summaryrefslogtreecommitdiff
diff options
authorMichael Vogt <mvo@ubuntu.com>2022-01-11 08:46:00 +0100
committerGitHub <noreply@github.com>2022-01-11 08:46:00 +0100
commit2e07b9d42f1dfcdeadfbaad4dbd8a0a75937b258 (patch)
tree2f3210c56e0ec072af995a91340c44ceea49790f
parent290751a793b5aa1bc9c161db9aa89fdf664a631e (diff)
parentae1f14af6a6465f75a47aa88833d1f6b67e836f4 (diff)
Merge pull request #11224 from bboozzoo/bboozzoo/snap-docs-improvement
cmd/snap, cmd/snap-confine: extend manpage, update links
-rw-r--r--cmd/snap-confine/snap-confine.rst2
-rw-r--r--cmd/snap/cmd_help.go15
-rw-r--r--cmd/snap/cmd_snap_op.go9
3 files changed, 22 insertions, 4 deletions
diff --git a/cmd/snap-confine/snap-confine.rst b/cmd/snap-confine/snap-confine.rst
index 1e78eca99e..e870a1def0 100644
--- a/cmd/snap-confine/snap-confine.rst
+++ b/cmd/snap-confine/snap-confine.rst
@@ -182,4 +182,4 @@ directly into the kernel. The actual apparmor profile is managed by `snapd`.
BUGS
====
-Please report all bugs with https://bugs.launchpad.net/snap-confine/+filebug
+Please report all bugs with https://bugs.launchpad.net/snapd/+filebug
diff --git a/cmd/snap/cmd_help.go b/cmd/snap/cmd_help.go
index 9fa287dfef..f23ce9c5f8 100644
--- a/cmd/snap/cmd_help.go
+++ b/cmd/snap/cmd_help.go
@@ -129,6 +129,20 @@ func (w *manfixer) flush() {
io.Copy(Stdout, strings.NewReader(str))
}
+func manExtend(out io.Writer) {
+ out.Write([]byte(`
+.SH NOTES
+.IP " 1. " 4
+Online documentation
+.RS 4
+\%https://docs.snapcraft.io
+.RE
+.SH BUGS
+.sp
+Please report all bugs with \fI\%https://bugs.launchpad.net/snapd/+filebug\fP
+`))
+}
+
func (cmd cmdHelp) Execute(args []string) error {
if len(args) > 0 {
return ErrExtraArgs
@@ -138,6 +152,7 @@ func (cmd cmdHelp) Execute(args []string) error {
// subcommand, but --man is hidden so no real need to check.
out := &manfixer{}
cmd.parser.WriteManPage(out)
+ manExtend(out)
out.flush()
return nil
}
diff --git a/cmd/snap/cmd_snap_op.go b/cmd/snap/cmd_snap_op.go
index f839a2f492..4cf773db09 100644
--- a/cmd/snap/cmd_snap_op.go
+++ b/cmd/snap/cmd_snap_op.go
@@ -56,7 +56,8 @@ To install multiple instances of the same snap, append an underscore and a
unique identifier (for each instance) to a snap's name.
With no further options, the snaps are installed tracking the stable channel,
-with strict security confinement.
+with strict security confinement. All available channels of a snap are listed in
+its 'snap info' output.
Revision choice via the --revision override requires the user to
have developer access to the snap, either directly or through the
@@ -85,7 +86,8 @@ The refresh command updates the specified snaps, or all snaps in the system if
none are specified.
With no further options, the snaps are refreshed to the current revision of the
-channel they're tracking, preserving their confinement options.
+channel they're tracking, preserving their confinement options. All available
+channels of a snap are listed in its 'snap info' output.
Revision choice via the --revision override requires the user to
have developer access to the snap, either directly or through the
@@ -1032,7 +1034,8 @@ func (x *cmdRevert) Execute(args []string) error {
var shortSwitchHelp = i18n.G("Switches snap to a different channel")
var longSwitchHelp = i18n.G(`
The switch command switches the given snap to a different channel without
-doing a refresh.
+doing a refresh. All available channels of a snap are listed in
+its 'snap info' output.
`)
type cmdSwitch struct {