summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2017-05-12 15:26:01 +0300
committerGitHub <[email protected]>2017-05-12 15:26:01 +0300
commit136e52e074be4a85fb9e9bccf93d060c46e67561 (patch)
tree997a89644bd495362ad64f13036f757f42249085
parent2f29661634177eaf205cbf3d115ab1cb9ab97ccb (diff)
parentec762b2f87b6813da2f28ed2344657af8e70dc24 (diff)
Merge pull request #15 from posener/doc
Add doc to Args
-rw-r--r--args.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/args.go b/args.go
index 86dd41a..6d4fea6 100644
--- a/args.go
+++ b/args.go
@@ -2,9 +2,19 @@ package complete
// Args describes command line arguments
type Args struct {
+ // All lists of all arguments in command line (not including the command itself)
All []string
+ // Completed lists of all completed arguments in command line,
+ // If the last one is still being typed - no space after it,
+ // it won't appear in this list of arguments.
Completed []string
+ // Last argument in command line, the one being typed, if the last
+ // character in the command line is a space, this argument will be empty,
+ // otherwise this would be the last word.
Last string
+ // LastCompleted is the last argument that was fully typed.
+ // If the last character in the command line is space, this would be the
+ // last word, otherwise, it would be the word before that.
LastCompleted string
}