Summary: | ASTERISK-05439: [patch] Show functions on CLI even when specified in lowercase | ||
Reporter: | Tilghman Lesher (tilghman) | Labels: | |
Date Opened: | 2005-11-03 11:29:11.000-0600 | Date Closed: | 2005-11-03 19:17:53.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Functions/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20051103__cli_func_uppercase.diff.txt ( 1) funccase.patch | |
Description: | Function names in the dialplan are currently case-sensitive, but people do not normally type in uppercase when looking for a function (but tab-completion does change lowercase to uppercase). This changes the CLI to accept lowercased function names, e.g. *CLI> show function if -= Info about function 'IF' =- | ||
Comments: | By: Russell Bryant (russell) 2005-11-03 11:48:05.000-0600 What was the original reasoning for making them case sensitive in the dialplan? I kind of feel like the cli command and dialplan use should be consistent. By: Tilghman Lesher (tilghman) 2005-11-03 11:55:13.000-0600 You'd have to ask Mark. That was a decision handed down from on high. By: Russell Bryant (russell) 2005-11-03 12:04:36.000-0600 I propose this little one-liner in addition to your patch. :) It seems to make sense to have functions consistent with applications as far as case goes, IMO ... By: Tilghman Lesher (tilghman) 2005-11-03 12:50:09.000-0600 Some of the discussion took place in ASTERISK-4001 By: Russell Bryant (russell) 2005-11-03 15:15:41.000-0600 I have requested input from Mark/Kevin on this. By: Jason Parker (jparker) 2005-11-03 18:20:11.000-0600 drumkilla: Wouldn't your patch make his redundant? If that function (ast_custom_function_find) already checks (with your proposed patch) without case, the loop in the first patch would only be run if the CLI function wasn't found at all - making it useless. Just my 2c. Edit: oh, and what if a CLI function is mixed case? The first patch didn't support that. By: Russell Bryant (russell) 2005-11-03 19:15:35.000-0600 In any case, I talked to Mark and Kevin about this. The executive decision was to leave dialplan variables case sensitive, for performance reasons as well as that regular channel variables are case sensitive as well. For staying consistent with the usage in the dialplan, the cli command should stay the same as well. Thanks :) |