Change ref commands to accept global flags.