From f6c64f0b99dbe7d09e894855112e357062ea78f5 Mon Sep 17 00:00:00 2001 From: Craig Hesling Date: Tue, 10 Apr 2018 02:31:31 -0400 Subject: [PATCH 1/2] gocomplete - Attempted to add go tool pack --- gocomplete/complete.go | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gocomplete/complete.go b/gocomplete/complete.go index 553de9d..cf896cc 100644 --- a/gocomplete/complete.go +++ b/gocomplete/complete.go @@ -277,7 +277,25 @@ func main() { }, Args: anyFile, }, - "pack": {}, + "pack": { + /* this lacks the positional aspect of all these params */ + Flags: complete.Flags{ + "c": complete.PredictNothing, + "p": complete.PredictNothing, + "r": complete.PredictNothing, + "t": complete.PredictNothing, + "x": complete.PredictNothing, + "cv": complete.PredictNothing, + "pv": complete.PredictNothing, + "rv": complete.PredictNothing, + "tv": complete.PredictNothing, + "xv": complete.PredictNothing, + }, + Args: complete.PredictOr( + complete.PredictFiles("*.a"), + complete.PredictFiles("*.o"), + ), + }, "pprof": { Flags: complete.Flags{ "-callgrind": complete.PredictNothing, From 123c7b13bc969ab03c851edd16dd611b3f5058f1 Mon Sep 17 00:00:00 2001 From: Craig Hesling Date: Tue, 10 Apr 2018 02:32:35 -0400 Subject: [PATCH 2/2] gocomplete - Attempted to add go tool link --- gocomplete/complete.go | 52 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/gocomplete/complete.go b/gocomplete/complete.go index cf896cc..02f73ef 100644 --- a/gocomplete/complete.go +++ b/gocomplete/complete.go @@ -261,7 +261,57 @@ func main() { }, Args: anyGo, }, - "link": {}, + "link": { + Flags: complete.Flags{ + "-B": complete.PredictAnything, // note + "-D": complete.PredictAnything, // address (default -1) + "-E": complete.PredictAnything, // entry symbol name + "-H": complete.PredictAnything, // header type + "-I": complete.PredictAnything, // linker binary + "-L": complete.PredictDirs("*"), // directory + "-R": complete.PredictAnything, // quantum (default -1) + "-T": complete.PredictAnything, // address (default -1) + "-V": complete.PredictNothing, + "-X": complete.PredictAnything, + "-a": complete.PredictAnything, + "-buildid": complete.PredictAnything, // build id + "-buildmode": complete.PredictAnything, + "-c": complete.PredictNothing, + "-cpuprofile": anyFile, + "-d": complete.PredictNothing, + "-debugtramp": complete.PredictAnything, // int + "-dumpdep": complete.PredictNothing, + "-extar": complete.PredictAnything, + "-extld": complete.PredictAnything, + "-extldflags": complete.PredictAnything, // flags + "-f": complete.PredictNothing, + "-g": complete.PredictNothing, + "-importcfg": anyFile, + "-installsuffix": complete.PredictAnything, // dir suffix + "-k": complete.PredictAnything, // symbol + "-libgcc": complete.PredictAnything, // maybe "none" + "-linkmode": complete.PredictAnything, // mode + "-linkshared": complete.PredictNothing, + "-memprofile": anyFile, + "-memprofilerate": complete.PredictAnything, // rate + "-msan": complete.PredictNothing, + "-n": complete.PredictNothing, + "-o": complete.PredictAnything, + "-pluginpath": complete.PredictAnything, + "-r": complete.PredictAnything, // "dir1:dir2:..." + "-race": complete.PredictNothing, + "-s": complete.PredictNothing, + "-tmpdir": complete.PredictDirs("*"), + "-u": complete.PredictNothing, + "-v": complete.PredictNothing, + "-w": complete.PredictNothing, + // "-h": complete.PredictAnything, // halt on error + }, + Args: complete.PredictOr( + complete.PredictFiles("*.a"), + complete.PredictFiles("*.o"), + ), + }, "nm": { Flags: complete.Flags{ "-n": complete.PredictNothing,