mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 16:45:38 -05:00
fo
@@ -12,11 +12,12 @@ fe() {
|
|||||||
[ -n "$file" ] && ${EDITOR:-vim} "$file"
|
[ -n "$file" ] && ${EDITOR:-vim} "$file"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Extended version where you can press CTRL-O to open with `open` command
|
# Modified version where you can press
|
||||||
# fe [FUZZY PATTERN]
|
# - CTRL-O to open with `open` command,
|
||||||
fe() {
|
# - CTRL-E or Enter key to open with the $EDITOR
|
||||||
|
fo() {
|
||||||
local out file key
|
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")
|
key=$(head -1 <<< "$out")
|
||||||
file=$(head -2 <<< "$out" | tail -1)
|
file=$(head -2 <<< "$out" | tail -1)
|
||||||
if [ -n "$file" ]; then
|
if [ -n "$file" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user