silent if autocompleting

This commit is contained in:
2022-05-11 11:30:22 +03:00
parent f8821fc670
commit 9d035e20f4

4
bake
View File

@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
## VERSION 22.4.5 ## VERSION 22.5.11
## BASH-MAKE ========================================================== ## BASH-MAKE ==========================================================
## Utility to mimick some of GNU Make behavior, but run in a single ## Utility to mimick some of GNU Make behavior, but run in a single
## bash shell. This executable can be used as the Bakefile, too, ## bash shell. This executable can be used as the Bakefile, too,
@@ -42,7 +42,7 @@ complete -F _bake_complete bake
# Run me as: source <( $BAKE __autocomplete__ ) # Run me as: source <( $BAKE __autocomplete__ )
' '
exit; } exit; }
_flines() { cat "$BAKEFILE" | \ _flines() { cat "$BAKEFILE" 2>/dev/null | \
grep -E '^([^_][a-zA-Z0-9_\.\-]+)\(\) {.*'; } grep -E '^([^_][a-zA-Z0-9_\.\-]+)\(\) {.*'; }
_menu() { _flines | while read line; do _menu() { _flines | while read line; do
if [[ "$line" =~ ([a-zA-Z0-9_\.\-]+)\(\).\{[\ #]*(.*) ]]; then if [[ "$line" =~ ([a-zA-Z0-9_\.\-]+)\(\).\{[\ #]*(.*) ]]; then