From eb58893b486edfdf130912c1557f56d741d188bc Mon Sep 17 00:00:00 2001 From: Salt Date: Sat, 6 Mar 2021 05:37:02 -0600 Subject: [PATCH] Fix not having a function in bash template --- base/.vim/templates/=template=.bash | 8 ++++++++ 1 file changed, 8 insertions(+) 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() {