refine -g option argument handling.