fzf: extract separator
This commit is contained in:
parent
ccb7c5a6f2
commit
94b77ffd0e
@ -35,11 +35,12 @@ function __fzf_git_log
|
||||
end
|
||||
|
||||
function __fzf_history
|
||||
set -l separator ' | '
|
||||
set -l output (
|
||||
history search --null --show-time="%Y-%m-%d | " |
|
||||
history search --null --show-time="%Y-%m-%d$separator" |
|
||||
fzf --read0 --tiebreak=index --query=(commandline) --preview='echo {}' --preview-window='bottom:50%:hidden:wrap' --bind='?:toggle-preview'
|
||||
)
|
||||
if set -l command (string split --max 1 " | " $output)[2..-1]
|
||||
if set -l command (string split --max 1 $separator $output)[2..-1]
|
||||
commandline -r $command
|
||||
end
|
||||
commandline -f repaint
|
||||
|
Loading…
x
Reference in New Issue
Block a user