oh-my-bash/completions/makefile.completion.sh
2022-01-15 15:46:11 +09:00

5 lines
269 B
Bash

# -*- mode: bash -*-
# Add completion for Makefile
# see http://stackoverflow.com/a/38415982/1472048
complete -W "\$(shopt -u nullglob; shopt -s nocaseglob; command grep -oE '^[a-zA-Z0-9_-]+:([^=]|\$)' *makefile 2>/dev/null | command sed 's/[^a-zA-Z0-9_-]*\$//')" make