add completion scripts for command line autocomplete
This commit is contained in:
34
Makefile
34
Makefile
@@ -1,3 +1,5 @@
|
|||||||
|
SHELL := /bin/bash
|
||||||
|
|
||||||
tidy:
|
tidy:
|
||||||
go mod tidy
|
go mod tidy
|
||||||
|
|
||||||
@@ -27,4 +29,34 @@ tw:
|
|||||||
watch:
|
watch:
|
||||||
@make -j2 dev tw
|
@make -j2 dev tw
|
||||||
|
|
||||||
.PHONY: tidy clean build cli tui web dev tw
|
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
|
||||||
Reference in New Issue
Block a user