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

Run command from history? #1

Closed
bomberstudios opened this issue Nov 9, 2021 · 4 comments
Closed

Run command from history? #1

bomberstudios opened this issue Nov 9, 2021 · 4 comments

Comments

@bomberstudios
Copy link

Thanks for creating this, I love a simple tool (yay for one liners!)

I may be missing something, but it’d be nice to have an easy way to run one of the commands in the history.

This would probably turn this into a not-a-one-liner-anymore, and maybe ZSH already has a way to turn that list into something runnable, but something like this would be cool (for me, at least 😅):

$> jog
1. ls -la
2. make
3. make clean
4. sudo rm -rf /

Type a number to run the command again, any other key to exit: [ ]

Alternatively, the ability to run a command with jog 3 would also be interesting.

Again, thanks for sharing!

@khughitt
Copy link

khughitt commented Nov 9, 2021

alias jg='eval `jog | fzf`'

@DmitrySandalov
Copy link

Just wrote a Zaw source: DmitrySandalov/zaw-jog

@natethinks
Copy link
Owner

Love that alias solution. I'm going to close this because jog being a unix style solution, it's easily extensible by piping the output to anything you want.

@bomberstudios
Copy link
Author

Nice, thanks!

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

4 participants