Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Autocompletion of make targets in the shell.


I wrote my own completion for that :) Here is the pattern I use:

   run.sh

   build() {
     ...
   }

   test() {
     ...
   }

   deploy() {
     ...
   }

   # This lets you do ./run.sh build foo bar at the command 
   # line.  The autocomplete scans for functions in .sh files
   # and fills them in as the first arg.

   "$@"




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: