We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8cdb00f commit d2b1a2bCopy full SHA for d2b1a2b
main.go
@@ -7,6 +7,11 @@ import (
7
dirp "github.com/avindra/dirp/src"
8
)
9
10
+func driller(path string) {
11
+ cfg := dirp.FindDirs(path)
12
+ dirp.Selector(cfg)
13
+}
14
+
15
func main() {
16
args := os.Args
17
args = args[1:]
@@ -22,8 +27,7 @@ func main() {
22
27
23
28
arg0 := args[0]
24
29
if dirp.IsDir(arg0) {
25
- cfg := dirp.FindDirs(arg0)
26
- dirp.Selector(cfg)
30
+ driller(arg0)
31
} else if arg0 == "hook" {
32
if len(args) >= 2 {
33
switch args[1] {
@@ -59,5 +63,8 @@ NOARGS:
59
63
60
64
if len(cfg) > 0 {
61
65
dirp.Selector(cfg)
66
+ } else {
67
+ // No config detected, default to driller
68
+ driller(".")
62
69
}
70
0 commit comments