fix: Fix empty line for checkbox and list prompt
This commit is contained in:
+2
-4
@@ -119,11 +119,10 @@ confirm() {
|
|||||||
# echo "Your choice: ${options[$option]}"
|
# echo "Your choice: ${options[$option]}"
|
||||||
list() {
|
list() {
|
||||||
_prompt_text "$1 "
|
_prompt_text "$1 "
|
||||||
echo "" >&2
|
|
||||||
|
|
||||||
local opts=("${@:2}")
|
local opts=("${@:2}")
|
||||||
local opts_count=$(($# -1))
|
local opts_count=$(($# -1))
|
||||||
_new_line_foreach_item "${opts[@]}"
|
_new_line_foreach_item "${opts[*]}"
|
||||||
|
|
||||||
# determine current screen position for overwriting the options
|
# determine current screen position for overwriting the options
|
||||||
local lastrow; lastrow=$(_get_cursor_row)
|
local lastrow; lastrow=$(_get_cursor_row)
|
||||||
@@ -177,11 +176,10 @@ list() {
|
|||||||
# echo "Your choices: ${checked}"
|
# echo "Your choices: ${checked}"
|
||||||
checkbox() {
|
checkbox() {
|
||||||
_prompt_text "$1"
|
_prompt_text "$1"
|
||||||
echo "" >&2
|
|
||||||
|
|
||||||
local opts; opts=("${@:2}")
|
local opts; opts=("${@:2}")
|
||||||
local opts_count; opts_count=$(($# -1))
|
local opts_count; opts_count=$(($# -1))
|
||||||
_new_line_foreach_item "${opts[@]}"
|
_new_line_foreach_item "${opts[*]}"
|
||||||
|
|
||||||
# determine current screen position for overwriting the options
|
# determine current screen position for overwriting the options
|
||||||
local lastrow; lastrow=$(_get_cursor_row)
|
local lastrow; lastrow=$(_get_cursor_row)
|
||||||
|
|||||||
Reference in New Issue
Block a user