builtin/apply: move 'options' variable into cmd_apply()