summaryrefslogtreecommitdiff
path: root/argv.proto
diff options
context:
space:
mode:
Diffstat (limited to 'argv.proto')
-rw-r--r--argv.proto53
1 files changed, 33 insertions, 20 deletions
diff --git a/argv.proto b/argv.proto
index 23054f6..9a38585 100644
--- a/argv.proto
+++ b/argv.proto
@@ -8,28 +8,41 @@ import "google/protobuf/timestamp.proto"; // Import the well-known type for Time
import "google/protobuf/duration.proto"; // for duration
message App {
- string APPNAME = 1;
- string VERSION = 2;
- string BUILDTIME = 3;
+ string APPNAME = 1;
+ string VERSION = 2;
+ string BUILDTIME = 3;
}
-message Argv { // `autogenpb:marshal` `autogenpb:sort` `autogenpb:nomutex`
- google.protobuf.Timestamp ctime = 1; // when the user tried this autocomplete
- google.protobuf.Duration duration = 2; // time since the last autocomplete
- App appInfo = 3;
- repeated string args = 4; // a copy of os.Args
- repeated string real = 5; // what will really be sent to the application
- string subcmd = 6; // the subcommand being processed. For "git pull <tab>", cmd would be "pull"
- string partial = 7; // if the user has only partially inputed something
- repeated string goargs = 8; // what to send to alex flint's go-args for help
- bool fast = 9; // is autocomplete running quickly?
- string stdout = 10; // all output is loaded here before being sent to the shell
- string stderr = 11; // all output is loaded here before being sent to the shell
+message StructEntry {
+ string structName = 2; // 'Force', 'Verbose', 'SortCmd'
+ string structType = 3; // 'string', 'int', '[]string', '*FindCmd'
+ string defaultVal = 4; // "true"
+ string helpText = 5; // "This will help you"
+ string matchText = 6; // "--help-me
}
-message Argvs { // `autogenpb:marshal` `autogenpb:sort` `autogenpb:nomutex`
- string uuid = 1; // `autogenpb:uuid:1e6e765c-0c77-4c81-a622-0d819bfcce9a`
- string version = 2; // `autogenpb:version:v0.0.3`
- repeated Argv argvs = 3;
- string filename = 4; // `autogenpb:save` -- this enables autogenerated pb.Load() and pb.Save()
+message ArgTree {
+ repeated StructEntry Structs = 1; // a tree of the argv structs in argv.go
+ string mainArgvName = 2; // name to use in main.go
+}
+
+message Argv { // `autogenpb:marshal` `autogenpb:sort` `autogenpb:nomutex`
+ google.protobuf.Timestamp ctime = 1; // when the user tried this autocomplete
+ google.protobuf.Duration duration = 2; // time since the last autocomplete
+ App appInfo = 3;
+ repeated string args = 4; // a copy of os.Args
+ repeated string real = 5; // what will really be sent to the application
+ string subcmd = 6; // the subcommand being processed. For "git pull <tab>", cmd would be "pull"
+ string partial = 7; // if the user has only partially inputed something
+ repeated string goargs = 8; // what to send to alex flint's go-args for help
+ bool fast = 9; // is autocomplete running quickly?
+ string stdout = 10; // all output is loaded here before being sent to the shell
+ string stderr = 11; // all output is loaded here before being sent to the shell
+}
+
+message Argvs { // `autogenpb:marshal` `autogenpb:sort` `autogenpb:nomutex`
+ string uuid = 1; // `autogenpb:uuid:1e6e765c-0c77-4c81-a622-0d819bfcce9a`
+ string version = 2; // `autogenpb:version:v0.0.3`
+ repeated Argv argvs = 3;
+ string filename = 4; // `autogenpb:save` -- this enables autogenerated pb.Load() and pb.Save()
}