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

Handle Newlines #154

Closed
unphased opened this issue Mar 22, 2015 · 3 comments
Closed

Handle Newlines #154

unphased opened this issue Mar 22, 2015 · 3 comments

Comments

@unphased
Copy link

I think it can be helpful if there's a way to specify an escape sequence that represents a newline but which does not separate the text into different options.

I can get 90% of the way there (by defining the escape sequence myself and splicing it in before and replacing the output with newlines), but I need support inside fzf to show the entry as a multiple line entry with the whole thing being one item.

But as a workaround having a big ugly placeholder escape code that I can see inside the menu is still more or less usable.

(Example use case -- I want to use fzf with my shell history, and the shell history can contain multi line commands that would be cool if I can reproduce faithfully, rather than what fc -l 1 does which is just print \n for them)

@junegunn
Copy link
Owner

Related: #121

Thanks for the suggestion but it's non-trivial to implement multi-line entry display and it will make many parts of the code much more complex. Think about how we should handle long-line truncation and horizontal scroll, multi-part highlighting in extended-search mode possibly spanning multiple lines, page scroll, terminal resize, mouse clicks, ANSI color highlighting, etc. I have very limited time to work on fzf, so I can't say anything about it right now.

@unphased
Copy link
Author

Yep, and I definitely can't fault you for making the decision originally (or even now) to say that newline is the de facto standard delimiter.

My workaround works fine... I will close since you left #121 open.

@junegunn
Copy link
Owner

junegunn commented Jun 7, 2024

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

2 participants