-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Search directory] Allow customizing the file preview command (#156)
To allow users to implement custom file previews (great ideas include previewing images or showing hexdumps), the command used to preview files is now configurable. To change it, set the variable fzf_preview_file_cmd.
- Loading branch information
1 parent
a0bbc2f
commit 3285c08
Showing
3 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
set multi_word_dir "tests/_resources/multi word dir" | ||
|
||
set fzf_preview_file_cmd rev | ||
|
||
set actual (__fzf_preview_file "$multi_word_dir/file 1.txt") | ||
@test "correctly uses custom command to preview files" "$actual" = "1 elif si sihT" |