Summary: | ASTERISK-05916: [patch] command completion for 'help' command | ||
Reporter: | Luigi Rizzo (rizzo) | Labels: | |
Date Opened: | 2005-12-28 09:55:51.000-0600 | Date Closed: | 2006-01-17 10:27:30.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) complete_help.diff | |
Description: | the attached patch provides command completion for the 'help' command. E.g. when you type "help m<TAB>" it returns the list of commands starting with m for which help is available. I think this is a very useful feature to have. The code is amazingly simple, which means that the infrastructure was quite good! There are only two issues related to this patch, as noted by XXX in the code. 1) should we call ____ast_cli_generator with the last argument set to 1 ? I believe that since we are already recursively called by ast_cli_generator, the 0 is correct; 2) We should stop completing commands when we run out of fields in ast_cli_entry(), but there is no way to tell this to __ast_cli_generator(). A quick hack would be to overload the last argument, a better solution would be to add an extra argument to the function. ****** ADDITIONAL INFORMATION ****** coding this was a lot of fun! | ||
Comments: | By: Luigi Rizzo (rizzo) 2005-12-28 09:57:53.000-0600 bah, of course you should get rid of the ast_log() line, it was there only for debugging!! By: Matt O'Gorman (mogorman) 2006-01-17 10:26:34.000-0600 commited into trunk commit 8127 |