Closed radio24 closed 2 years ago
I am loving this bug issue template, really helps
Yes, max will be pinned, so this change would be accepted, if possible to consider also the AUTH_* and any other relevant option to pin/fix lines regarding clients names (why 11?).
[ "${i}" -gt 11 ] && i=11
# shellcheck disable=SC2086
CHOICE_SERVICE="$(dialog --clear --backtitle "${BACKTITLE}" --title "${TITLE}" --"${DIALOG_TYPE}" "${MENU}" \
"$((i+8))" 80 ${i} ${SERVICE_LIST} 2>&1 >/dev/tty)"
11 because this is the maximum number I can squeeze into my PiTFT Plus 480x320 3.5".
https://github.com/nyxnor/onionservice/blob/d429606e546b65321ce8b7191cd23702f8871dbb/onionservice-tui#L70
Issue It seems (I use whiptail instead of dialog) that the "2" representing two entries is hardcoded in this line of code. However, someone may have only one or several entries.
Describe the solution you'd like For the above reasons, I propose to replace "2" with "$i". To be sure that the list is not getting too long and is fitting to a little LCD display, the entire code could look like that:
Additional remarks I didn't submit a pull request yet because I don't use dialog, and I'm not entirely sure it reacts like whiptail.