Improve global command to support short command resolution
Validate constraints in require command, fixes #2197