-
Notifications
You must be signed in to change notification settings - Fork 72
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
Preview files with ls and bat #18
Conversation
0b613fd
to
984c990
Compare
@@ -24,5 +24,6 @@ if not set --query FZF_DEFAULT_OPTS | |||
# reverse layout is more familiar as it mimicks the layout of git log, history, and env | |||
# border makes clear where the fzf window ends | |||
# height 75% allows you to view what you were doing and stay in context of your work | |||
set --export FZF_DEFAULT_OPTS '--cycle --layout=reverse --border --height 75%' | |||
# preview-window wrap wraps long lines in the preview window | |||
set --export FZF_DEFAULT_OPTS '--cycle --layout=reverse --border --height 75% --preview-window=wrap' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved --preview-window=wrap
here since now, more than one features use fzf previews and this is a sane option for fzf previews.
@@ -10,7 +10,7 @@ function __fzf_search_shell_variables --description "Search and inspect shell va | |||
# __echo_value_or_print_message will print an informative message in lieu of the value. | |||
set variable_name ( | |||
set --names | | |||
fzf --preview '__echo_value_or_print_message {}' --preview-window wrap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consolidated this option into FZF_DEFAULT_OPTS
If the file is a directory, ls it. If the file is a regular file, bat it. Otherwise, explain that such files cannot be previewed.