diff --git a/Makefile b/Makefile index ee8af5e..2e82291 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +SHELL := /bin/bash + tidy: go mod tidy @@ -27,4 +29,34 @@ tw: watch: @make -j2 dev tw -.PHONY: tidy clean build cli tui web dev tw \ No newline at end of file +completions: + @go build -o ./bin/pm ./cmd/pm + @mkdir -p ./bin + @./bin/pm completion bash > ./bin/pm_bash.sh + @./bin/pm completion zsh > ./bin/pm_zsh.sh + @./bin/pm completion fish > ./bin/pm_fish.sh + @./bin/pm completion powershell > ./bin/pm_powershell.ps1 + +install-bash-temp: completions + @go install ./cmd/pm + @source ./bin/pm_bash.sh + +install-zsh-temp: completions + @go install ./cmd/pm + @source ./bin/pm_zsh.sh + +install-fish-temp: completions + @go install ./cmd/pm + @source ./bin/pm_fish.sh + +install-powershell-temp: completions + @go install ./cmd/pm + @source ./bin/pm_powershell.ps1 + + +install-cli: completions + @go install ./cmd/pm + @sudo cp ./bin/pm_bash.sh /etc/bash_completion.d/pm + + +.PHONY: tidy clean build cli tui web dev tw completions install-bash-temp install-zsh-temp install-fish-temp install-powershell-temp install-cli \ No newline at end of file