sq/.generate-completions.sh
Neil O'Toole c7ab3ed79e
Shell completion fixes (#388)
* Now correctly handling cobra.ShellCompNoDescRequestCmd in cli.ExecuteWith

* wip: partially moved to new 'completion' cmd impl

* More comments clarification

* make fmt

* rename .completions.sh -> .generate-completions.sh

* Deleted unused cli/cmd_completion.go
2024-01-30 23:04:10 -07:00

19 lines
592 B
Bash
Executable File

#!/bin/sh
# ".generate-completions.sh" regenerates shell completions to "./completions".
# This script is invoked by a hook in .goreleaser.yml during the CI
# release process, generating "sq.bash", "sq.zsh", etc. into "./completions".
# goreleaser then uses those generated completions for the various install
# packages it creates.
#
# Note that the "./completions" dir is not committed to git; it is generated
# on demand when goreleaser runs.
set -e
rm -rf completions
mkdir completions
for sh in bash zsh fish powershell; do
go run main.go completion "$sh" >"completions/sq.$sh"
done