m1guelpf / plz-cli

Copilot for your terminal
MIT License
1.58k stars 78 forks source link

Write command to history early #21

Closed soerface closed 1 year ago

soerface commented 1 year ago

If a command execution is terminated by Ctrl+C or execution fails, it is currently not added to history. In my opinion, it should still be added to history.

Use case: I recently experienced that the AI returned a find / …. I liked the rest of the command, but I just wanted to search in the current directory. I therefore terminated the execution and wanted to adjust the line. Unfortunately, the command didn't appear in my history, so I couldn't press the key. I had to copy the command with my mouse from the terminal and then paste it.