Summary: | ASTERISK-11188: [patch] Have `help foo` report that "foo" isn't valid, if it isn't. | ||
Reporter: | Kenneth Shumard (kshumard) | Labels: | |
Date Opened: | 2008-01-09 13:30:45.000-0600 | Date Closed: | 2008-01-09 14:28:41.000-0600 |
Priority: | Trivial | Regression? | No |
Status: | Closed/Complete | Components: | |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) cli.help.patch | |
Description: | `help foo` on the Asterisk command line currently returns, without reporting any text at all, if "foo" is not a valid help topic. The user experience is better if Asterisk displays text indicating that "foo" is not a valid help topic, rather than returning silently. Go from... ariel*CLI> help foo ariel*CLI> To... ariel*CLI> help foo No such command 'foo'. ariel*CLI> ****** ADDITIONAL INFORMATION ****** I'm honestly not sure this is an acceptable way to achieve the desired result. I don't pretend to grok help1 in all its invocations. But, this one logic inversion makes it behave the way I want it to without apparent undesired side effects. I'm interested to know what the right way of solving this is, if this isn't it. | ||
Comments: | By: Jason Parker (jparker) 2008-01-09 14:15:54.000-0600 At the beginning of the help1 function, there is a comment which is a bit odd, and perhaps no longer correct. It doesn't seem to make much sense for it to even check whether it's locked or not. /*! \brief helper for final part of * handle_help. if locked = 0 it's just "help_workhorse", * otherwise assume the list is already locked and print * an error message if not found. */ I'm going to try removing that part of the check entirely, and see if anything blows up. By: Digium Subversion (svnbot) 2008-01-09 14:28:40.000-0600 Repository: asterisk Revision: 97623 _U trunk/ U trunk/main/cli.c ------------------------------------------------------------------------ r97623 | qwell | 2008-01-09 14:28:39 -0600 (Wed, 09 Jan 2008) | 14 lines Merged revisions 97622 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue ASTERISK-11188) ........ r97622 | qwell | 2008-01-09 14:28:43 -0600 (Wed, 09 Jan 2008) | 5 lines Correctly display a message if a command could not be found. Also fix a comment which may have led to this happening. Issue 11718, reported by kshumard. ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=97623 |