blob: 4fbc7d04fa7b1ead53736bf39ce9cf465a34ad40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// Copyright 2025 WIT.COM Inc Licensed GPL 3.0
syntax = "proto3";
package argvpb;
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
import "google/protobuf/duration.proto"; // for duration
message App {
string APPNAME = 1;
string VERSION = 2;
string BUILDTIME = 3;
}
message StructEntry {
string structName = 1; // 'Force', 'Verbose', 'SortCmd'
string structType = 2; // 'string', 'int', '[]string', '*FindCmd'
string defaultVal = 3; // "true"
string helpText = 4; // "This will help you"
string matchText = 5; // "--help-me
}
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; // set at the start of argv.Init()
google.protobuf.Duration duration = 2; // could mean lots of things
google.protobuf.Duration argvDuration = 3; // how long autocomplete & match took
App appInfo = 4;
repeated string args = 5; // a copy of os.Args
repeated string real = 6; // what will really be sent to the application
string subcmd = 7; // the subcommand being processed. For "git pull <tab>", cmd would be "pull"
string partial = 8; // if the user has only partially inputed something
int32 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
string stddbg = 12; // all output is loaded here before being sent to the shell
int32 outCounter = 13; // counter to track if the help text has been sent to Stderr
int32 errCounter = 14; // counter to track if the help text has been sent to Stderr
string uuid = 15; // 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.6`
repeated Argv argvs = 3;
string filename = 4; // `autogenpb:save` -- this enables autogenerated pb.Load() and pb.Save()
}
|