@@ -738,13 +738,11 @@ function choose_() (
738738 ' --match=' * ) option_matches+=(" ${item#* =} " ) ;;
739739 ' --default-exact=' * | ' --default=' * ) defaults_exact+=(" ${item#* =} " ) ;;
740740 ' --defaults-exact=' * | ' --defaults=' * )
741- mapfile -t tmp <<< " ${item#*=}"
742- defaults_exact+=(" ${tmp[@]} " )
741+ __split defaults_exact --append -- " ${item#* =} "
743742 ;;
744743 ' --default-fuzzy=' * ) defaults_fuzzy+=(" ${item#* =} " ) ;;
745744 ' --defaults-fuzzy=' * )
746- mapfile -t tmp <<< " ${item#*=}"
747- defaults_fuzzy+=(" ${tmp[@]} " )
745+ __split defaults_fuzzy --append -- " ${item#* =} "
748746 ;;
749747 ' --no-default-all' * | ' --default-all' * )
750748 option_default_all=" $( get-flag-value --affirmative --fallback=" $option_default_all " -- " $item " ) "
@@ -1249,8 +1247,7 @@ function choose_() (
12491247 style__hide_cursor=' '
12501248 style__show_cursor=' '
12511249 # set rendering
1252- mapfile -t items_renders < <( get-array " $items_count " )
1253- mapfile -t items_rows < <( get-array " $items_count " )
1250+ __make_array items_renders items_rows --size=" $items_count "
12541251 # paging support is eternal, so no need for future updates if disabled
12551252 function reset_terminal_modifications_now {
12561253 :
@@ -1275,7 +1272,7 @@ function choose_() (
12751272 function refresh_terminal_size {
12761273 # refresh
12771274 local terminal_size=()
1278- mapfile -t terminal_size < <( get-terminal-lines-and-columns)
1275+ __split terminal_size --no-zero-length < <( get-terminal-lines-and-columns)
12791276 terminal_lines=" ${terminal_size[0]} "
12801277 terminal_columns=" ${terminal_size[1]} "
12811278
@@ -1308,8 +1305,7 @@ function choose_() (
13081305
13091306 # reset paging for new size
13101307 paging_used=' maybe'
1311- mapfile -t items_renders < <( get-array " $items_count " )
1312- mapfile -t items_rows < <( get-array " $items_count " )
1308+ __make_array items_renders items_rows --size=" $items_count "
13131309
13141310 # update priors
13151311 terminal_lines_prior=" $terminal_lines "
@@ -2234,7 +2230,7 @@ function choose_() (
22342230 # input => keys => key
22352231 keys=()
22362232 skips=()
2237- mapfile -t keys <<< " $input"
2233+ __split keys -- " $input "
22382234 for key in " ${keys[@]} " ; do
22392235 if is-digit -- " $key " ; then
22402236 action_jump " $key "
0 commit comments