mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 08:13:40 -05:00
fo
@@ -12,11 +12,12 @@ fe() {
|
||||
[ -n "$file" ] && ${EDITOR:-vim} "$file"
|
||||
}
|
||||
|
||||
# Extended version where you can press CTRL-O to open with `open` command
|
||||
# fe [FUZZY PATTERN]
|
||||
fe() {
|
||||
# Modified version where you can press
|
||||
# - CTRL-O to open with `open` command,
|
||||
# - 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)
|
||||
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