This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define make completions | |
function _make_completions() { | |
local -a targets | |
if [[ -f 'Makefile' ]]; then | |
# Read targets from Makefile using Extended Regular Expressions | |
# This regex aims to match any target that does not start with a dot and includes more characters than before. | |
targets=($(grep -oE '^[^\.#][^ ]*:' Makefile | sed 's/:.*//')) | |
fi | |
# Define completions based on targets |
OlderNewer