refactor: drop eval from pick_live_party
Select the chosen positional argument with shift + "$1" instead of building a $pick-indexed variable reference through eval.
This commit is contained in:
parent
c28101e2e8
commit
bdcad47147
1 changed files with 2 additions and 1 deletions
3
party
3
party
|
|
@ -668,7 +668,8 @@ pick_live_party() {
|
|||
if [ "$pick" -lt 1 ] || [ "$pick" -gt $# ]; then
|
||||
echo "party: out of range" >&2; return 1
|
||||
fi
|
||||
eval "roster_read \"\$$pick\""
|
||||
shift $((pick - 1))
|
||||
roster_read "$1"
|
||||
}
|
||||
|
||||
# Resolve the party a join or knock targets: the named party if given,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue