mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 16:45:38 -05:00
fe
@@ -7,11 +7,9 @@ You can replace `fzf` command on each example with [`fzf-tmux`](https://github.c
|
||||
# - Bypass fuzzy finder if there's only one match (--select-1)
|
||||
# - Exit if there's no match (--exit-0)
|
||||
fe() {
|
||||
IFS='
|
||||
'
|
||||
local declare files=($(fzf-tmux --query="$1" --select-1 --exit-0))
|
||||
local files
|
||||
IFS=$'\n' files=($(fzf-tmux --query="$1" --multi --select-1 --exit-0))
|
||||
[[ -n "$files" ]] && ${EDITOR:-vim} "${files[@]}"
|
||||
unset IFS
|
||||
}
|
||||
|
||||
# Modified version where you can press
|
||||
@@ -19,7 +17,7 @@ fe() {
|
||||
# - CTRL-E or Enter key to open with the $EDITOR
|
||||
fo() {
|
||||
local out file key
|
||||
out=$(fzf-tmux --query="$1" --exit-0 --expect=ctrl-o,ctrl-e)
|
||||
IFS=$'\n' out=($(fzf-tmux --query="$1" --exit-0 --expect=ctrl-o,ctrl-e))
|
||||
key=$(head -1 <<< "$out")
|
||||
file=$(head -2 <<< "$out" | tail -1)
|
||||
if [ -n "$file" ]; then
|
||||
|
||||
Reference in New Issue
Block a user