summaryrefslogtreecommitdiff
path: root/complete.go
diff options
context:
space:
mode:
Diffstat (limited to 'complete.go')
-rw-r--r--complete.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/complete.go b/complete.go
index 1bd4366..a1968bf 100644
--- a/complete.go
+++ b/complete.go
@@ -80,6 +80,27 @@ func (args) Examples() string {
return out
}
+func (args) Match() bool {
+ if argvpb.PB.IsMatch("cache") {
+ matches, _ := matchCacheFiles()
+ fmt.Fprintf(argvpb.Stdout, "%s", matches)
+ return true
+ }
+
+ if argvpb.PB.IsMatch("mode.--config") {
+ matches, _ := matchModeDirs()
+ fmt.Fprintf(argvpb.Stdout, "%s", matches)
+ return true
+ }
+
+ if argvpb.PB.IsMatch("mode") {
+ matches := []string{"jwc", "false"}
+ fmt.Fprintf(argvpb.Stdout, "%s", " "+strings.Join(matches, " "))
+ return true
+ }
+ return false
+}
+
// sends the strings to bash or zsh that will be your options
func (a args) DoAutoComplete() error {
var err error