Created
February 2, 2020 21:38
-
-
Save memilanuk/d74371704c5d37d9d7fbe815954d173c to your computer and use it in GitHub Desktop.
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
_make is a function | |
_make () | |
{ | |
local cur; | |
COMPREPLY=(); | |
cur="${COMP_WORDS[COMP_CWORD]}"; | |
if [[ ${cur} != -* ]]; then | |
local glob=$(shopt -p nullglob); | |
shopt -s nullglob; | |
COMPREPLY=($(compgen -W "$(for f in *.c; do echo ${f%.c}; done)" -- ${cur})); | |
eval "${glob}" &> /dev/null; | |
return 0; | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment