diff --git a/documentation/RELEASE_NOTES.md b/documentation/RELEASE_NOTES.md index c1914e95f..870be17a4 100644 --- a/documentation/RELEASE_NOTES.md +++ b/documentation/RELEASE_NOTES.md @@ -17,6 +17,16 @@ should also be read to understand what has changed since earlier releases. +### Tab completion for IOC shell + +When built with optional libreadline support, the interactive IOC shell will perform tab +completion for command names as well as some arguments of built-in commands. +eg. the record name argument of `dbpr`, and the path name argument of `cd`. + +Externally defined commands have a limited ability to opt into completion with +the newly added `iocshArgStringRecord` and `iocshArgStringPath` argument types. +Both function identically to `iocshArgString` with an added hint about completion. + ### Add FMOD as CALC Expression The floating point modulo function `FMOD(NUM,DEN)` is added. diff --git a/modules/libcom/src/iocsh/iocsh.h b/modules/libcom/src/iocsh/iocsh.h index 70bf9af37..ef0d5c50d 100644 --- a/modules/libcom/src/iocsh/iocsh.h +++ b/modules/libcom/src/iocsh/iocsh.h @@ -66,7 +66,13 @@ typedef enum { iocshArgPdbbase, iocshArgArgv, iocshArgPersistentString, + /** Equivalent to iocshArgString with a hint for tab completion as a record name. + * @since UNRELEASED + */ iocshArgStringRecord, + /** Equivalent to iocshArgString with a hint for tab completion as a file system path. + * @since UNRELEASED + */ iocshArgStringPath, }iocshArgType;