fixed a bug when completing the first word of a command
fixed a bug when completing the first word of a command