How to suppress "command not found" if I use on_command_not_found event? #5277
-
Hi everybody! So, I have an idea... basically, I want a third mode besides Python and subprocess, where if I just enter some plain text, the input is simply fed to a llm. It seems rather simple to me, if it's not python, and the subprocess can't find the command, then my own function is executed. Thanks already! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Here is the code: Lines 490 to 493 in 1d54c74 Probably you can improve this logic e.g. control the error using the on_command_not_found event. Feel free to wrap your idea into xontrib using xontrib-template in 5 minutes. |
Beta Was this translation helpful? Give feedback.
-
Yes. You should propose changes and the PR to implement them. |
Beta Was this translation helpful? Give feedback.
Yes. You should propose changes and the PR to implement them.
For example this logic could be: if on_command_not_found event returns 0, skip showing the error.