[Xorp-hackers] XORPSH: command space auto-completion

Ray Qiu ray.qiu@gmail.com
Sat, 24 Jul 2004 21:01:29 -0700


Hi there, 

I like this project and you guys have done an awesome job.  Thanks!

It seems that currently the command space auto-completion only works for
the first command, because the code looks like this: 

cli/cli_node_net.cc:

if (token.empty() || (multi_command_find(command_line) != NULL)){
  unbind space to complete-word
 ...
}

It is not handy, because we have to use tab. 

It seems to work better in the following:

// check the last character to see if it is a space, if so unbind
space to complete-word.
if (token.empty() || (command_line[command_line.length() - 1] == ' ')) {
  unbind space to complete-word
   ..
}

Now space auto-cpmpletion works for sub commands as well.

Any thoughts?

--Ray