bash completion of makefile target

前端 未结 6 1997
小蘑菇
小蘑菇 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:38

    Could this be what you're looking for?

    http://freshmeat.net/projects/bashcompletion/

    make [Tab] would complete on all targets in Makefile. This project was conceived to produce programmable completion routines for the most common Linux/UNIX commands, reducing the amount of typing sysadmins and programmers need to do on a daily basis.

提交回复
热议问题