Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature proposal: cache input command & save them as history #116

Open
orsonzhai opened this issue Apr 11, 2020 · 1 comment
Open

New feature proposal: cache input command & save them as history #116

orsonzhai opened this issue Apr 11, 2020 · 1 comment

Comments

@orsonzhai
Copy link

I use picocom for almost 10 years IIRC. In my case, I use it as a serial console tool for debugging the embedded boards.
Because the boards has no enough resource for history command storage, I have to input the same commands again and again after a reboot which maybe very frequently.
Is it a good idea to save all of them for later use at picocom side?
And an additional proposal is we can cache the input before pressing CR/LR key and send them all out at one time. It will be useful for some boards which has very short expire time when receiving inputs.
How do you think about these?

@wsakernel
Copy link

I had this problem as well. However, I don't think picocom is the proper location to tackle the problem. It would have issues: Linenoise only allows one history file, so input would be mixed with picocom-internal commands (not so bad probably). Cycling through the history would mean escape-key plus a second key. Not super comfortable. Deleting the current line and updating it with the next history item over a flaky serial line might generate artefacts resulting in modified items. Also, the history items will be clobbered with all your typos + backspaces to delete them, keys from prgrams you control with key presses (fdisk), etc...

I solved this by extending my terminal have multiple clipboards which I can copy/paste to/from. Works good enough and is even more generic because I can use it for my local shells as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants