bugFixed in getCmd,need to add dofile and tab later