mirror of
https://github.com/danbulant/nekofetch
synced 2026-05-19 04:08:43 +00:00
If height argument isn't a number, automatically choose size
This commit is contained in:
parent
9f4fb0960b
commit
0c0b8f71bd
1 changed files with 1 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ case "$1" in
|
|||
;;
|
||||
esac
|
||||
|
||||
height=${2:-$(($(stty size | awk '{print $1}') - 5))}
|
||||
echo "$2" | grep -qE '^[0-9]+$' && height="$2" || height="$(($(stty size | awk '{print $1}') - 5))"
|
||||
echo "Using height $height"
|
||||
|
||||
url=$(curl -fsSL "$imgurl" | jq -r ".url")
|
||||
|
|
|
|||
Loading…
Reference in a new issue