drmorr0 / viz

Graph visualization software
Other
0 stars 0 forks source link

Command Prompt Autocomplete #2

Open drmorr0 opened 10 years ago

drmorr0 commented 10 years ago

Want to have tab-completion for command-prompt commands and file-system navigation.

drmorr0 commented 10 years ago

This is going to be a much more complicated task than it sounds initially. We may need to implement a context-free grammar parser for this (I'm hoping to avoid context-sensitive grammars, but we'll see). This will definitely be a long-term goal, though we might be able to get a stub in place for filename autocompletion.

drmorr0 commented 10 years ago

We may want to use the Gtk::EntryCompletion object to help us out here. I'm not sure exactly how it all works yet, but it looks like it may have some/all of the functionality that we want. I am becoming more convinced that we'll need to completely revamp aspects of the command system to really make this work.

drmorr0 commented 10 years ago

With the implementation of the templated command structure, we've taken a decent step towards this goal. I now have access to both the type (syntactic) and meaning (semantic) for each command parameter, which I should be able to use to do auto-complete. For the time being, command structures are very rigorous (no optional commands or complex logic), so this gets rid of some of the complexity inherent in this issue.