mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 16:45:38 -05:00
make fe function work with multiple selections
@@ -7,9 +7,8 @@ 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)
|
# - Bypass fuzzy finder if there's only one match (--select-1)
|
||||||
# - Exit if there's no match (--exit-0)
|
# - Exit if there's no match (--exit-0)
|
||||||
fe() {
|
fe() {
|
||||||
local file
|
local declare files=($(fzf-tmux --query="$1" --select-1 --exit-0))
|
||||||
file=$(fzf --query="$1" --select-1 --exit-0)
|
[[ -n "$files" ]] && ${EDITOR:-vim} ${files[@]}
|
||||||
[ -n "$file" ] && ${EDITOR:-vim} "$file"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Modified version where you can press
|
# Modified version where you can press
|
||||||
|
|||||||
Reference in New Issue
Block a user