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

history multiline commands #2585

Closed
leiserfg opened this issue Dec 8, 2015 · 5 comments
Closed

history multiline commands #2585

leiserfg opened this issue Dec 8, 2015 · 5 comments
Labels

Comments

@leiserfg
Copy link

leiserfg commented Dec 8, 2015

There are a way to get multilines commands on history not as one single command (maybe by un-escaping the output).

@faho
Copy link
Member

faho commented Dec 9, 2015

Depends on what exactly you want. $history will contain these things as one element, but you can then apply splitting manually - set line (echo $history[1]) will do that to the most recent history element.

@leiserfg
Copy link
Author

leiserfg commented Dec 9, 2015

Thanks!

@faho faho added the question label Dec 9, 2015
@faho
Copy link
Member

faho commented Dec 9, 2015

@leiserfg: What is it you want to do with this, though?

@leiserfg
Copy link
Author

I'm trying to improve the ctrl-r bind of fzf. I can do that by reading cat fish_history|sed ... but it's not a clean way.

@faho
Copy link
Member

faho commented Dec 18, 2015

Yeah, it'd work for that. (Your sample command contains a useless-use-of-cat, btw - sed can read files)

@faho faho closed this as completed Dec 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants