Skip to content

Understanding the use of "~" with the "--height" option. #3989

Answered by junegunn
habahabahaba asked this question in Q&A
Discussion options

You must be logged in to vote

Looks like ~SIZE only limits the size of the main window. The height of the preview window is calculated after the height of the main window is determined. I don't quite remember if I did it on purpose or not, but anyway, it is how it is. You can work around the problem by using the half of the desired height.

# The main window will take at most 40% of the screen height. The preview window will take the same height.
fzf --height=~40% --preview 'seq 1000' --preview-window top

seq 10 | fzf --height=~40% --preview 'seq 1000' --preview-window top

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@habahabahaba
Comment options

@junegunn
Comment options

Answer selected by habahabahaba
@habahabahaba
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants