-
Notifications
You must be signed in to change notification settings - Fork 119
Description
Answers checklist.
- I have read the component documentation ESP-IDF Components and the issue is not addressed there.
- I am using target and esp-idf version as defined in component's idf_component.yml
- I have searched the issue tracker for a similar issue and not found any related issue.
Which component are you using? If you choose Other, provide details in More Information.
Other
ESP-IDF version.
v5.5.1
Development Kit.
Not applicable
Used Component version.
v1.0.2
More Information.
Terminal Probe
The method esp_linenoise_probe is hidden in private includes in the esp_linenoise, at the same time in the original library this method was public.
Why make it private? I believe there are legitimate use-cases that require end-user control of when the terminal probe occurs. Oftentimes it is impossible or impractical (network console, for example) to ensure that a terminal is connected to the device before linenoise gets initialized (usually this means before ESP32 is powered up). In this case I'd like to just add a console command that calls esp_linenoise_probe, which re-probes the terminal once it is connected, finds it POSIX-compliant and enables advanced features.
I have successfully implemented the "reprobe" process in my devices with legacy linenoise before.
At the moment, if you connect a terminal to ESP32's console after esp_linenoise is initialized, you are stuck with dumb mode.
Dynamic Prompt
esp_linenoise does not allow to dynamically change prompt string (internals of the esp_linenoise_handle_t are once again hidden in private includes). It was possible with legacy library, and is useful when switching between dumb and normal modes. In dumb mode, the application should not use escape sequences; whereas in normal mode we can use those to make the prompt colorful.