Removed un-necessary shifts and reset index of variable
This commit is contained in:
parent
6cf389acdd
commit
5501e3fa57
@ -18,9 +18,8 @@ get_disks () {
|
|||||||
|
|
||||||
get_choices () {
|
get_choices () {
|
||||||
local PROMPT="$1"
|
local PROMPT="$1"
|
||||||
shift
|
local -n OUTPUT_VAR="$2"
|
||||||
local -n OUTPUT_VAR="$1"
|
shift 2
|
||||||
shift
|
|
||||||
local -a OPTIONS=( $@ )
|
local -a OPTIONS=( $@ )
|
||||||
|
|
||||||
select item in ${OPTIONS[@]} quit; do
|
select item in ${OPTIONS[@]} quit; do
|
||||||
@ -45,8 +44,7 @@ get_choice () {
|
|||||||
echo "1: $1"
|
echo "1: $1"
|
||||||
local PROMPT="$1"
|
local PROMPT="$1"
|
||||||
local -n OUTPUT_VAR="$2"
|
local -n OUTPUT_VAR="$2"
|
||||||
shift
|
shift 2
|
||||||
shift
|
|
||||||
local -a OPTIONS=( $@ )
|
local -a OPTIONS=( $@ )
|
||||||
|
|
||||||
select item in ${OPTIONS[@]} quit; do
|
select item in ${OPTIONS[@]} quit; do
|
||||||
|
Loading…
Reference in New Issue
Block a user