bash completion of makefile target

前端 未结 6 2118
小蘑菇
小蘑菇 2021-01-31 01:59

Suppose I have a simple makefile like:

hello:
   echo \"hello world\"

bye:
   echo \"bye bye\"

Then in bash I want something like:

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-31 02:33

    There's a useful package called bash-completion available for most every OS. It includes Makefile completion.

    (If you're using macOS and Homebrew, you can get this via brew install bash-completion.)

提交回复
热议问题