summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorewy <ewy0@protonmail.com>2026-05-02 16:23:36 +0200
committerewy <ewy0@protonmail.com>2026-05-02 16:23:36 +0200
commitc01a06e38d0b0331f459cd439ce7706ef1556e50 (patch)
tree8bee63be92b6301d169be6113dfc3bbf16d37c9e /main.go
parent1e932e7015ac9d21a1f92ad57cd0c109f58bb29f (diff)
* fix infinite loop on not found
* add bash tab completion script (will have install option in the future) * add search to tui (bound to / and ?)
Diffstat (limited to 'main.go')
-rw-r--r--main.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.go b/main.go
index b2fb96c..6724cfd 100644
--- a/main.go
+++ b/main.go
@@ -139,8 +139,9 @@ func main() {
if *flags.List {
for _, s := range st.Sources {
+ _, _ = spool.Print("%v", s.Label()+paths.Ifs)
for _, t := range s.Targets {
- _, _ = spool.Print("%v\n", t.ShortestId()+paths.Ifs)
+ _, _ = spool.Print("%v", t.ShortestId()+paths.Ifs)
}
}
os.Exit(0)
@@ -169,7 +170,7 @@ func main() {
result := search.Search(st, args...)
// TODO: Move auto-all logic into Search?
- if !*flags.All && result.Target == nil && len(result.Args) > 0 {
+ if !*flags.All && result.Target == nil && len(result.Args) > 0 && SourcesWithoutResults == nil && !ForceConfirm {
ForceConfirm = true
if err != nil {
_, _ = spool.Warn("%v\n", err)
@@ -181,7 +182,7 @@ func main() {
}
if result.Target == nil {
- _, _ = spool.Warn("target not found.")
+ _, _ = spool.Warn("target not found.\n")
os.Exit(1)
return
}