allow glob pattern in var command
Conflicts: documentation/RELEASE_NOTES.md
This commit is contained in:
@@ -17,6 +17,11 @@ should also be read to understand what has changed since earlier releases.
|
||||
|
||||
<!-- Insert new items immediately below here ... -->
|
||||
|
||||
### Glob pattern allowed in `var` command
|
||||
|
||||
When used with one argument, the `var` command can be used with a glob pattern
|
||||
for printing matching variables.
|
||||
|
||||
### Fix for input links marked "special"
|
||||
|
||||
The calcout record (and a number of synApps record types) marks its input
|
||||
|
||||
@@ -1130,6 +1130,16 @@ static void varCallFunc(const iocshArgBuf *args)
|
||||
for (v = iocshVariableHead ; v != NULL ; v = v->next)
|
||||
varHandler(v->pVarDef, args[1].sval);
|
||||
}
|
||||
else if(args[1].sval == NULL) {
|
||||
int found = 0;
|
||||
for (v = iocshVariableHead ; v != NULL ; v = v->next)
|
||||
if (epicsStrGlobMatch(v->pVarDef->name, args[0].sval) != 0) {
|
||||
varHandler(v->pVarDef, NULL);
|
||||
found = 1;
|
||||
}
|
||||
if (!found)
|
||||
fprintf(epicsGetStderr(), "No var matching %s found.\n", args[0].sval);
|
||||
}
|
||||
else {
|
||||
v = (iocshVariable *)registryFind(iocshVarID, args[0].sval);
|
||||
if (v == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user