prevent early deletion of tmp buffer file
This commit is contained in:
parent
981c5e8bbf
commit
8a4fcc768a
1 changed files with 3 additions and 1 deletions
|
@ -181,7 +181,9 @@ define-command -hidden fzf-buffer-search %{
|
|||
echo "execute-keys %{%<a-|>cat<space>><space>$buffer_content<ret>;}"
|
||||
echo "execute-keys $line g $char l"
|
||||
echo "fzf \"execute-keys \$1 gx\" \"(nl -b a -n ln $buffer_content\" \"--reverse | cut -f 1)\""
|
||||
echo "nop %sh{rm $buffer_content}"
|
||||
(echo "fzf \"execute-keys \$1 gx\" \"(nl -b a -n ln $buffer_content\" \"--reverse | cut -f 1)\"") 1>&2
|
||||
# sleep 2 is needed to because everything is done asynchronously, so file should not be deleted until it was read by fzf
|
||||
echo "nop %sh{sleep 2; rm $buffer_content}"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue