scripts/choose: refactor (playing some golf)