-
Notifications
You must be signed in to change notification settings - Fork 84
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
Feature Request: Select command but do not execute it. #85
Comments
Hey @Gibby, thanks for the feedback. This is actually the default behavior for bashhub with Zsh. In Bash this is unfortunately not possible as far as I'm aware. I originally tried to build this and actually asked about it on Stackoverflow years back: https://stackoverflow.com/questions/22951608/python-or-bash-print-output-to-command-line-ready-to-be-executed |
closing as I don't believe this is possible in bash. This is the default behavior in Zsh. |
I got this working on both Ubuntu and Mac in bash by adding the following function.
Then I changed these lines.
|
I think I got the inspiration from https://github.com/dvorka/hstr |
@Gibby thanks for sharing! any idea if this possible using python? wondering to avoid adding a dependency on perl. Feel free to submit a PR as well if you're interested :) Would be happy to make this the default experience. |
I think so - https://docs.python.org/3.8/library/fcntl.html I'll see if I can figure it out |
Looking into this a bit more, found a few other threads with similar or other ways of approaching this.
Hacking at it a bit and haven't been able to get anything to work quite yet. Tried the python solution mentioned here and also tried using autopy. @Gibby, please share if you find something viable on Python or just bash. |
Any news? In my case, on mac the selected entry is just printed and not filled or executed |
@weeebdev what do you mean by 'just printed and not filled or executed'? Also what shell are you running? |
fish shell. I meant, that when I pick a command from the history, it's just being printed in the console but not actually executed |
It would be nice to be able to select a command and have it filled on the cli but not be executed right away.
The text was updated successfully, but these errors were encountered: