diff --git a/base/.vim/templates/=template=.bash b/base/.vim/templates/=template=.bash index 501d3676..bc8b77ef 100644 --- a/base/.vim/templates/=template=.bash +++ b/base/.vim/templates/=template=.bash @@ -66,6 +66,14 @@ has() { done return 0 } +validateline() { + # Takes a line and errors if it's just whitespace or a comment + local linenows=${1//[[:space:]]} + if ! [ "${1#\#}" = "$1" ] || [ -z "$linenows" ]; then + return 1 + fi + return 0 +} # Core program functions printhelp() {