summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile13
-rw-r--r--argv.proto.next35
2 files changed, 39 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 656758e..7f9db03 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,10 @@
all: goimports proto vet
@echo This GO code passes the compile checks
+proto-renumber:
+ autogenpb --renumber --proto argv.proto
+ make goimports vet
+
proto:
autogenpb --proto argv.proto
@@ -28,12 +32,3 @@ redomod:
goimports -w *.go
GO111MODULE= go mod init
GO111MODULE= go mod tidy
-
-
-# fixes your numbers if you move things around
-# THIS TOTALLY BREAKS THE POINT OF PROTOBUF
-# To work around that breaking, you must change the version
-# also, all the wrapping code must support this. which it doesn't
-proto-renumber: clean
- autogenpb --renumber --proto argv.proto
- make goimports vet
diff --git a/argv.proto.next b/argv.proto.next
new file mode 100644
index 0000000..734a13e
--- /dev/null
+++ b/argv.proto.next
@@ -0,0 +1,35 @@
+// 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 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 = 18;
+ repeated string args = 7; // a copy of os.Args
+ repeated string real = 7; // what will really be sent to the application
+ string subcmd = 8; // the subcommand being processed. For "git pull <tab>", cmd would be "pull"
+ string partial = 9; // if the user has only partially inputed something
+ repeated string goargs = 15; // what to send to alex flint's go-args for help
+ bool fast = 16; // is autocomplete running quickly?
+ string stdout = 19; // all output is loaded here before being sent to the shell
+ string stderr = 10; // 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()
+}