summaryrefslogtreecommitdiff
path: root/Magefile.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-11 22:26:06 +0300
committerPaul Buetow <paul@buetow.org>2026-04-11 22:26:06 +0300
commit969006d536d1861f9602da19d1c724f9def871f7 (patch)
tree30d102cdbc37daf339568cce2d74849b34484fd6 /Magefile.go
parentfc66593de1ec7935764063fbbe25378de34b321d (diff)
Release v0.31.1: stop installing Fish ask.fish on mage installv0.31.1
mage install no longer writes ~/.config/fish/completions/ask.fish; use ask fish | source or a conf.d snippet per docs/fish-completion.md. Made-with: Cursor
Diffstat (limited to 'Magefile.go')
-rw-r--r--Magefile.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/Magefile.go b/Magefile.go
index 4cea341..65748fd 100644
--- a/Magefile.go
+++ b/Magefile.go
@@ -7,7 +7,6 @@ import (
"fmt"
"io"
"os"
- "os/exec"
"path/filepath"
"regexp"
"strconv"
@@ -132,41 +131,9 @@ func Install() error {
return err
}
}
- return installFishCompletion(filepath.Join(bin, "ask"))
-}
-
-func installFishCompletion(askBin string) error {
- fishConfigDir, err := resolveFishConfigDir()
- if err != nil {
- return err
- }
- completionsDir := filepath.Join(fishConfigDir, "completions")
- if err := os.MkdirAll(completionsDir, 0o755); err != nil {
- return err
- }
- out, err := exec.Command(askBin, "fish").Output()
- if err != nil {
- return fmt.Errorf("generate fish completion: %w", err)
- }
- dst := filepath.Join(completionsDir, "ask.fish")
- if err := os.WriteFile(dst, out, 0o644); err != nil {
- return err
- }
- fmt.Printf("installed %s\n", dst)
return nil
}
-func resolveFishConfigDir() (string, error) {
- if xdg := os.Getenv("XDG_CONFIG_HOME"); xdg != "" {
- return filepath.Join(xdg, "fish"), nil
- }
- home, err := os.UserHomeDir()
- if err != nil {
- return "", fmt.Errorf("resolve home: %w", err)
- }
- return filepath.Join(home, ".config", "fish"), nil
-}
-
// RunTmuxAction runs the hexai-tmux-action TUI via go run (reads stdin).
func RunTmuxAction() error {
printCoverage()