summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2017-05-07 07:59:42 +0300
committerEyal Posener <[email protected]>2017-05-07 07:59:42 +0300
commitfd5c13f7ed2e9a3e3a82fa6a4c6ffe649f3f32f2 (patch)
tree796dca6d948ba247381b52744a2d4126268e83ff /readme.md
parentc94813be30b569795e953937612a7df5a0741861 (diff)
Remove Name from Command struct
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md6
1 files changed, 2 insertions, 4 deletions
diff --git a/readme.md b/readme.md
index 62ce6af..5ad2e71 100644
--- a/readme.md
+++ b/readme.md
@@ -54,9 +54,6 @@ func main() {
// to complete.
run := complete.Command{
- // Name must be exactly as the binary that we want to complete
- Name: "run",
-
// Sub defines a list of sub commands of the program,
// this is recursive, since every command is of type command also.
Sub: complete.Commands{
@@ -88,6 +85,7 @@ func main() {
// run the command completion, as part of the main() function.
// this triggers the autocompletion when needed.
- complete.Run(run)
+ // name must be exactly as the binary that we want to complete.
+ complete.Run("run", run)
}
```