diff options
| author | ewy <ewy0@protonmail.com> | 2026-05-02 17:07:22 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-05-02 17:07:22 +0200 |
| commit | 64a5dd6b324ed93ab61fcc7039124ede797984b2 (patch) | |
| tree | 47cb586bb276638651a46f2b872e1b2db390fc5e /completion | |
| parent | 1c681ad4149f994a2a8caf21133747b9348002c6 (diff) | |
whoops, add completion file
Diffstat (limited to 'completion')
| -rw-r--r-- | completion/completion.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/completion/completion.go b/completion/completion.go new file mode 100644 index 0000000..917c7b4 --- /dev/null +++ b/completion/completion.go @@ -0,0 +1,19 @@ +package completion + +import ( + _ "embed" + "github.com/ewy1/pik/spool" +) + +//go:embed completion.sh +var completionCode string + +var completionCodeByShell = map[string]string{ + "bash": ". <(pik --completion)", + "zsh": `autoload bashcompinit && bashcompinit && source <(pik --completion)`, +} + +func Echo() error { + _, err := spool.Print(completionCode) + return err +} |
