fix(app): improve global opt and run cmd parsing (#10067)
This change fixes an issue introduced in python-poetry#10021 that led to options
provided in the form `-<shortcut><value>` to be incorrectly handled.
Further, it also simplifies and fixes run command processing.
Resolves: #10051