Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e93b63e

Browse files
committed
cleaning
1 parent fa66292 commit e93b63e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

vhc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function config {
1616

1717
while read -r string
1818
do [[ "${string:0:4}" == "vhc:" ]] && config "${string}"
19-
[[ ${#string} -gt ${size} ]] && size=${#string}
19+
[[ ${#string} -gt ${size} ]] && size=${#string}
2020
$_e "${string}" >> "${temporary}"
2121
done
2222

@@ -40,15 +40,17 @@ function str_repeat {
4040
}
4141

4242
function line {
43-
str_repeat "$((size + adjust))" "$1"
43+
[ $# -eq 1 ] \
44+
&& str_repeat "$((size + adjust))" "$1" \
45+
|| $_e "${corner[$1]}$(line "${lines[$1]}")${corner[$2]}"
4446
}
4547

4648
function line_top {
47-
$_e "${corner[0]}$(line "${lines[0]}")${corner[1]}"
49+
line 0 1
4850
}
4951

5052
function line_bottom {
51-
$_e "${corner[2]}$(line "${lines[2]}")${corner[3]}"
53+
line 2 3
5254
}
5355

5456
trap line_top \

0 commit comments

Comments
 (0)