feat: parse all Go CLIs with flaggy; dump bash complete.
Tests / Test (push) Skipped
Tests / OCR (tesseract fixture) (push) Skipped
Tests / Release (semver) (push) Skipped
Tests / Test (pull_request) Failing after 6s
Tests / OCR (tesseract fixture) (pull_request) Failing after 4s
Tests / Release (semver) (pull_request) Skipped

stdlib flag dropped --hop after the query. One wrapper in internal/cli,
source <(./bin/cli/complete.go bash). Gitea #34.
This commit is contained in:
2026-08-14 12:08:52 +01:00
parent 0065655e03
commit e04b037b33
34 changed files with 1005 additions and 420 deletions
+4 -10
View File
@@ -3,12 +3,13 @@ package chats
import (
"bufio"
"encoding/json"
"flag"
"fmt"
"os"
"path/filepath"
"regexp"
"strings"
cliparse "github.com/eSlider/2dph/internal/cli"
)
var (
@@ -76,15 +77,8 @@ type ExtractedFact struct {
}
func RunFacts(args []string) int {
fs := flag.NewFlagSet("chats facts", flag.ContinueOnError)
help := fs.Bool("help", false, "")
fs.SetOutput(os.Stderr)
if err := fs.Parse(args); err != nil {
return 2
}
if *help {
fmt.Fprintln(os.Stderr, "usage: chats facts")
return 0
if err := parseNoFlags("chats-facts", args); err != nil {
return cliparse.Fail(err)
}
root := Dir()