General: Fix more shellcheck errors
This commit is contained in:
parent
9572d37073
commit
7ac4d56286
10
neofetch
10
neofetch
|
@ -1898,7 +1898,7 @@ get_ascii() {
|
||||||
|
|
||||||
# Calculate size of ascii file in line length / line count.
|
# Calculate size of ascii file in line length / line count.
|
||||||
line="${line//\$\{??\}}"
|
line="${line//\$\{??\}}"
|
||||||
line="${line//'\\'/'\'}"
|
line="${line//\\\\/\\}"
|
||||||
(("${#line}" > "${ascii_length:-0}")) && ascii_length="${#line}"
|
(("${#line}" > "${ascii_length:-0}")) && ascii_length="${#line}"
|
||||||
lines="$((lines+=1))"
|
lines="$((lines+=1))"
|
||||||
done < "$ascii"
|
done < "$ascii"
|
||||||
|
@ -2756,9 +2756,9 @@ dynamic_prompt() {
|
||||||
|
|
||||||
# Set the prompt location
|
# Set the prompt location
|
||||||
if (("$lines" < 0)); then
|
if (("$lines" < 0)); then
|
||||||
printf "\033[${lines/-}A"
|
printf "%b" "\033[${lines/-}A"
|
||||||
else
|
else
|
||||||
printf "\033[${lines}B"
|
printf "%b" "\033[${lines}B"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add some padding
|
# Add some padding
|
||||||
|
@ -2795,7 +2795,7 @@ cache_uname() {
|
||||||
usage() { printf "%s" "
|
usage() { printf "%s" "
|
||||||
NEOFETCH
|
NEOFETCH
|
||||||
|
|
||||||
USAGE: neofetch --option "value" --option "value"
|
USAGE: neofetch --option \"value\" --option \"value\"
|
||||||
|
|
||||||
NOTE: There's also a config option for each flag below.
|
NOTE: There's also a config option for each flag below.
|
||||||
|
|
||||||
|
@ -3119,7 +3119,7 @@ main() {
|
||||||
display_image
|
display_image
|
||||||
|
|
||||||
# Set cursor position next to ascii art
|
# Set cursor position next to ascii art
|
||||||
printf "\033[$((${lines:-0} - ${prompt_loc:-0}))A"
|
printf "%b" "\033[$((${lines:-0} - ${prompt_loc:-0}))A"
|
||||||
|
|
||||||
# Reset horizontal cursor position
|
# Reset horizontal cursor position
|
||||||
printf "\033[9999999D"
|
printf "\033[9999999D"
|
||||||
|
|
Reference in New Issue