diff --git a/snippets/make.json b/snippets/make.json index 57277ee2..976ae6c5 100644 --- a/snippets/make.json +++ b/snippets/make.json @@ -3,7 +3,7 @@ "prefix": "help", "body": [ "help: ## Prints help for targets with comments", - "\t@cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | awk 'BEGIN {FS = \":.*?## \"}; {printf \"\\033[36m%-30s\\033[0m %s\\n\", $\\$1, $\\$2}'" + "\t@awk 'BEGIN {FS = \":.*##\"; printf \"\\nUsage:\\n make \\033[36m\\033[0m\\n\"} /^[a-zA-Z_0-9-]+:.*?##/ { printf \" \\033[36m%-25s\\033[0m %s\\n\", $\\$1, $\\$2 } /^##@/ { printf \"\\n\\033[1m%s\\033[0m\\n\", substr($\\$0, 5) } ' $(MAKEFILE_LIST)" ], "description": "help target for self-documented Makefile" },