Skip to content

Commit ab3c3dd

Browse files
committed
chore: Run shfmt
1 parent 79f212a commit ab3c3dd

File tree

4 files changed

+90
-36
lines changed

4 files changed

+90
-36
lines changed

Bakefile.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
task.docs() {
44
shdoc < './pkg/src/public/bash-term.sh' > './docs/bash-term.md'
55
}
6+
7+
task.lint() {
8+
shfmt -w -ln bash -sr ./pkg ./Bakefile.sh
9+
}

bake

Lines changed: 82 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/src/public/bash-term.sh

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ term.cursor_hide() {
217217
term.cursor_show() {
218218
unset -v REPLY
219219

220-
221220
local flag_print='no' end=
222221
term.private_util_validate_p 0 "$@"
223222
shift "$REPLY_SHIFT" || core.panic 'Failed to shift'
@@ -239,8 +238,6 @@ term.cursor_getpos() {
239238
term.private_util_set_reply $'\e[6n'
240239
}
241240

242-
243-
244241
# -------------------------------------------------------- #
245242
# Erase #
246243
# -------------------------------------------------------- #
@@ -290,7 +287,6 @@ term.erase_line() {
290287
term.erase_screen_end() {
291288
unset -v REPLY
292289

293-
294290
local flag_print='no' end=
295291
term.private_util_validate_p 0 "$@"
296292
shift "$REPLY_SHIFT" || core.panic 'Failed to shift'
@@ -338,8 +334,6 @@ term.erase_saved_lines() { # TODO: better name?
338334
term.private_util_set_reply $'\e[3J'
339335
}
340336

341-
342-
343337
# -------------------------------------------------------- #
344338
# Scroll #
345339
# -------------------------------------------------------- #
@@ -370,8 +364,6 @@ term.scroll_up() {
370364
term.private_util_set_reply $'\e[M'
371365
}
372366

373-
374-
375367
# -------------------------------------------------------- #
376368
# Tab #
377369
# -------------------------------------------------------- #
@@ -412,8 +404,6 @@ term.tab_clearall() {
412404
term.private_util_set_reply $'\e[3g'
413405
}
414406

415-
416-
417407
# -------------------------------------------------------- #
418408
# Screen #
419409
# -------------------------------------------------------- #
@@ -444,8 +434,6 @@ term.screen_restore() {
444434
term.private_util_set_reply $'\e[?1049l'
445435
}
446436

447-
448-
449437
# -------------------------------------------------------- #
450438
# Color #
451439
# -------------------------------------------------------- #
@@ -827,8 +815,6 @@ term.color_white() {
827815
term.private_util_set_reply2 "\e[1;37m%s%s" "$text" "$end"
828816
}
829817

830-
831-
832818
# -------------------------------------------------------- #
833819
# Miscellaneous #
834820
# -------------------------------------------------------- #
@@ -843,12 +829,9 @@ term.beep() {
843829
shift "$REPLY_SHIFT" || core.panic 'Failed to shift'
844830
unset -v REPLY_SHIFT
845831

846-
847832
term.private_util_set_reply $'\a'
848833
}
849834

850-
851-
852835
# -------------------------------------------------------- #
853836
# Deprecated #
854837
# -------------------------------------------------------- #

pkg/src/util/util.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ term.private_util_validate_p() {
99
elif (($# - 1 == args_excluding_flags)); then
1010
if [[ $1 == -?(@(p|P)) ]]; then
1111
case $1 in
12-
*p*) flag_print='yes' ;;
13-
*P*) flag_print='yes-newline' ;;
12+
*p*) flag_print='yes' ;;
13+
*P*) flag_print='yes-newline' ;;
1414
esac
1515
REPLY_SHIFT=1
1616
else
@@ -29,8 +29,8 @@ term.private_util_validate_pd() {
2929
if (($# - 1 == args_excluding_flags)); then
3030
if [[ $1 == -?(d|@(p|P)|d@(p|P)|@(p|P)d) ]]; then
3131
case $1 in
32-
*p*) flag_print='yes' ;;
33-
*P*) flag_print='yes-newline' ;;
32+
*p*) flag_print='yes' ;;
33+
*P*) flag_print='yes-newline' ;;
3434
esac
3535
if [[ $1 == *d* ]]; then
3636
end=$'\e[0m'

0 commit comments

Comments
 (0)