add completion generation to makefile
This commit is contained in:
parent
2c0c3320ee
commit
50d64368f9
2 changed files with 9 additions and 2 deletions
7
Makefile
7
Makefile
|
@ -2,7 +2,7 @@
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint: lint.py lint.sh
|
lint: lint.py lint.sh
|
||||||
|
|
||||||
msg = $(call tprint,{a.b_magenta}==>{a.end}{a.bold} $(1){a.end})
|
msg = $(if tprint,$(call tprint,{a.b_magenta}==>{a.end}{a.bold} $(1){a.end}),@echo '==> $(1)')
|
||||||
|
|
||||||
## lint.py | lint python files
|
## lint.py | lint python files
|
||||||
.PHONY: lint.py
|
.PHONY: lint.py
|
||||||
|
@ -16,6 +16,11 @@ lint.sh:
|
||||||
$(call msg,Linting Shell Files)
|
$(call msg,Linting Shell Files)
|
||||||
@shfmt -s -w $(shell shfmt -f .)
|
@shfmt -s -w $(shell shfmt -f .)
|
||||||
|
|
||||||
|
## completions | generate completion scripts
|
||||||
|
completions:
|
||||||
|
$(call msg,Generating Completions)
|
||||||
|
@./lib/completions/update.sh
|
||||||
|
|
||||||
## db, d-build | build docker image
|
## db, d-build | build docker image
|
||||||
.PHONY: db d-build
|
.PHONY: db d-build
|
||||||
db d-build:
|
db d-build:
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
CURDIR=${0:a:h}
|
||||||
|
|
||||||
gen() {
|
gen() {
|
||||||
if is-executable $1; then
|
if is-executable $1; then
|
||||||
echo "$1 updated"
|
echo "$1 updated"
|
||||||
"$@" | sed "s#$HOME#\$HOME#g" >"_$argv[1]"
|
"$@" | sed "s#$HOME#\$HOME#g" > $CURDIR/"_$argv[1]"
|
||||||
else
|
else
|
||||||
echo "skipping $1"
|
echo "skipping $1"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue