summaryrefslogtreecommitdiff
path: root/argv.custom.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-21 15:48:09 -0500
committerJeff Carr <[email protected]>2025-10-21 15:48:09 -0500
commitceab4c25d57568aa5359cc92c2905ba2e8e3c3cf (patch)
tree67c5aadbfcce3cda1588457a445b16fcde12f340 /argv.custom.go
parenta9af6f2ed2263f11bb13d2220df11402e269cef9 (diff)
basic IsMatch() kinda works
Diffstat (limited to 'argv.custom.go')
-rw-r--r--argv.custom.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/argv.custom.go b/argv.custom.go
index 63080d1..127d9a5 100644
--- a/argv.custom.go
+++ b/argv.custom.go
@@ -83,6 +83,14 @@ func (c CleanCmd) Match(partial string) []string {
// sends the strings to bash or zsh that will be your options
func (a args) SendCompletionStrings(pb *argvpb.Argv) {
+ if pb.IsMatch("mode.config") {
+ pb.SendStrings([]string{"mine", "favorites"})
+ os.Exit(0)
+ }
+ if pb.IsMatch("mode") {
+ pb.SendStrings([]string{"once", "many", "mine", "favorites"})
+ os.Exit(0)
+ }
if pb.Cmd == "" {
// these are base autocomplete strings
matches := []string{"clean", "commit", "merge", "patch", "normal", "pull", "rebuild", "generate", "config"}