[lxc-devel] [lxd/master] lxc: Show all commands in "man lxc"
stgraber on Github
lxc-bot at linuxcontainers.org
Mon Apr 24 16:16:44 UTC 2017
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 370 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170424/52c668e5/attachment.bin>
-------------- next part --------------
From 86e2f096fec0a06caf83c56c5c2820aa27ba99fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Mon, 24 Apr 2017 12:15:36 -0400
Subject: [PATCH] lxc: Show all commands in "man lxc"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Closes #3214
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
lxc/main.go | 3 +--
lxc/manpage.go | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lxc/main.go b/lxc/main.go
index 1287d14..a8af4be 100644
--- a/lxc/main.go
+++ b/lxc/main.go
@@ -62,8 +62,7 @@ func run() error {
}
if len(os.Args) >= 2 && (os.Args[1] == "--all") {
- os.Args[1] = "help"
- os.Args = append(os.Args, "--all")
+ os.Args = []string{os.Args[0], "help", "--all"}
}
if shared.StringInSlice("--version", os.Args) {
diff --git a/lxc/manpage.go b/lxc/manpage.go
index 5dc07c1..697f015 100644
--- a/lxc/manpage.go
+++ b/lxc/manpage.go
@@ -50,7 +50,7 @@ func (c *manpageCmd) run(_ *lxd.Config, args []string) error {
}
// Generate the main manpage
- err = help2man(execName, "LXD - client", filepath.Join(args[0], fmt.Sprintf("lxc.1")))
+ err = help2man(fmt.Sprintf("%s --all", execName), "LXD - client", filepath.Join(args[0], fmt.Sprintf("lxc.1")))
if err != nil {
return fmt.Errorf(i18n.G("Failed to generate 'lxc.1': %v"), err)
}
More information about the lxc-devel
mailing list