Run shfmt on all shell files
This commit is contained in:
parent
010de1d160
commit
0e47db4015
@ -15,7 +15,7 @@ DEFAULT_TEMPLATE_DIR="$HOME/Templates"
|
|||||||
|
|
||||||
# Helper functions
|
# Helper functions
|
||||||
function help() {
|
function help() {
|
||||||
cat << HELPMESSAGE
|
cat <<HELPMESSAGE
|
||||||
$(basename "$0") $MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION
|
$(basename "$0") $MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION
|
||||||
|
|
||||||
Usage: $(basename "$0") [-h] [-d DIR] [-f] dest
|
Usage: $(basename "$0") [-h] [-d DIR] [-f] dest
|
||||||
@ -33,7 +33,7 @@ HELPMESSAGE
|
|||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
'-d'|'--dir')
|
'-d' | '--dir')
|
||||||
DIR="${2}"
|
DIR="${2}"
|
||||||
case "${DIR}" in
|
case "${DIR}" in
|
||||||
"")
|
"")
|
||||||
@ -59,12 +59,12 @@ while true; do
|
|||||||
shift
|
shift
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
'-f'|'--force')
|
'-f' | '--force')
|
||||||
FORCE_OVERWRITE='--force'
|
FORCE_OVERWRITE='--force'
|
||||||
shift
|
shift
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
'-h'|'--help')
|
'-h' | '--help')
|
||||||
help
|
help
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
|
@ -16,7 +16,7 @@ ETC_DIR='/etc'
|
|||||||
|
|
||||||
# Helper functions
|
# Helper functions
|
||||||
function help() {
|
function help() {
|
||||||
cat << HELPMESSAGE
|
cat <<HELPMESSAGE
|
||||||
$(basename "$0") $MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION
|
$(basename "$0") $MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION
|
||||||
|
|
||||||
Usage: $(basename "$0") [-h|--help] [options] [patterns]
|
Usage: $(basename "$0") [-h|--help] [options] [patterns]
|
||||||
@ -35,12 +35,12 @@ HELPMESSAGE
|
|||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
'-b'|'--boot')
|
'-b' | '--boot')
|
||||||
EDIT_BOOT=1
|
EDIT_BOOT=1
|
||||||
shift
|
shift
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
'-d'|'--dir')
|
'-d' | '--dir')
|
||||||
DIR="${2}"
|
DIR="${2}"
|
||||||
case "${DIR}" in
|
case "${DIR}" in
|
||||||
"")
|
"")
|
||||||
@ -66,22 +66,22 @@ while true; do
|
|||||||
shift
|
shift
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
'-E'|'--etc')
|
'-E' | '--etc')
|
||||||
EDIT_ETC=1
|
EDIT_ETC=1
|
||||||
shift
|
shift
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
'-i'|'--no-ignore-vcs')
|
'-i' | '--no-ignore-vcs')
|
||||||
NO_IGNORE_VCS=1
|
NO_IGNORE_VCS=1
|
||||||
shift
|
shift
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
'-I'|'--no-ignore')
|
'-I' | '--no-ignore')
|
||||||
NO_IGNORE=1
|
NO_IGNORE=1
|
||||||
shift
|
shift
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
'-h'|'--help')
|
'-h' | '--help')
|
||||||
help
|
help
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
|
@ -3,5 +3,5 @@
|
|||||||
FZF_OPTS=('--select-1' '--exit-0')
|
FZF_OPTS=('--select-1' '--exit-0')
|
||||||
|
|
||||||
run_fzf() {
|
run_fzf() {
|
||||||
fzf "${FZF_OPTS[@]}" -- <<< "$@" || return 2
|
fzf "${FZF_OPTS[@]}" -- <<<"$@" || return 2
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user