Răsfoiți Sursa

Add bullet points to makefile target descriptions

Makes it easier to read in a variety of setups.
Weiyi Lou 9 ani în urmă
părinte
comite
76b5926a1a
3 a modificat fișierele cu 4 adăugiri și 5 ștergeri
  1. 2 3
      Makefile
  2. 1 1
      vim/settings/templates.vim
  3. 1 1
      vim/templates/makefile

+ 2 - 3
Makefile

@@ -9,10 +9,9 @@ aux = help install uninstall upgrade show-versions submodules xdg
 
 # Auto-Documenting Section. Displays a target list with `##` descriptions.
 help:
-	@echo "* Available tasks:"
-	@grep -E '^[a-zA-Z_-]+:.*## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "%-16s %s\n", $$1, $$2}'
+	@grep -E '^[a-zA-Z_-]+:.*## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "* %-16s %s\n", $$1, $$2}'
 	@echo ""
-	@echo "* Individual setup tasks:"
+	@echo "Individual setup tasks:"
 	@echo "$(all)"
 
 install: $(all) ## Set up all configurations.

+ 1 - 1
vim/settings/templates.vim

@@ -8,4 +8,4 @@ autocmd BufWritePost *.sh if getline(1) =~ "^#!/" | silent !chmod +x <afile> | e
 autocmd BufNewFile [Mm]akefile silent 0r ~/dotfiles/vim/templates/makefile | silent 4,$ g/^#/d | normal G
 
 " Template for pandoc files.
-autocmd BufNewFile *.pandoc silent 0r ~/dotfiles/vim/templates/pandoc | silent 0,$ g/^"/d | normal G
+autocmd BufNewFile *.pandoc silent 0r ~/dotfiles/vim/templates/pandoc | silent 0,$ g/^"/d | normal 2G$

+ 1 - 1
vim/templates/makefile

@@ -7,7 +7,7 @@
 # Unlike the blog post from which this is taken, there is no output colorisation
 # (e.g. `\033[36m`) for better compatibility in different setups.
 help:
-	@grep -E '^[a-zA-Z_-]+:.*## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "%-15s %s\n", $$1, $$2}'
+	@grep -E '^[a-zA-Z_-]+:.*## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "* %-15s %s\n", $$1, $$2}'
 .PHONY: help
 
 example: dependency ## Run the example task