Run shfmt on all shell files

This commit is contained in:
Eric Torres 2022-09-30 21:36:24 -07:00
parent 010de1d160
commit 0e47db4015
5 changed files with 142 additions and 142 deletions

View File

@ -15,7 +15,7 @@ DEFAULT_TEMPLATE_DIR="$HOME/Templates"
# Helper functions
function help() {
cat << HELPMESSAGE
cat <<HELPMESSAGE
$(basename "$0") $MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION
Usage: $(basename "$0") [-h] [-d DIR] [-f] dest
@ -33,7 +33,7 @@ HELPMESSAGE
while true; do
case "${1}" in
'-d'|'--dir')
'-d' | '--dir')
DIR="${2}"
case "${DIR}" in
"")
@ -59,12 +59,12 @@ while true; do
shift
continue
;;
'-f'|'--force')
'-f' | '--force')
FORCE_OVERWRITE='--force'
shift
continue
;;
'-h'|'--help')
'-h' | '--help')
help
exit
;;

View File

@ -16,7 +16,7 @@ ETC_DIR='/etc'
# Helper functions
function help() {
cat << HELPMESSAGE
cat <<HELPMESSAGE
$(basename "$0") $MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION
Usage: $(basename "$0") [-h|--help] [options] [patterns]
@ -35,12 +35,12 @@ HELPMESSAGE
while true; do
case "${1}" in
'-b'|'--boot')
'-b' | '--boot')
EDIT_BOOT=1
shift
continue
;;
'-d'|'--dir')
'-d' | '--dir')
DIR="${2}"
case "${DIR}" in
"")
@ -66,22 +66,22 @@ while true; do
shift
continue
;;
'-E'|'--etc')
'-E' | '--etc')
EDIT_ETC=1
shift
continue
;;
'-i'|'--no-ignore-vcs')
'-i' | '--no-ignore-vcs')
NO_IGNORE_VCS=1
shift
continue
;;
'-I'|'--no-ignore')
'-I' | '--no-ignore')
NO_IGNORE=1
shift
continue
;;
'-h'|'--help')
'-h' | '--help')
help
exit
;;

View File

@ -3,5 +3,5 @@
FZF_OPTS=('--select-1' '--exit-0')
run_fzf() {
fzf "${FZF_OPTS[@]}" -- <<< "$@" || return 2
fzf "${FZF_OPTS[@]}" -- <<<"$@" || return 2
}