# Modified version where you can press # - CTRL-O to open with `open` command, # - CTRL-E or Enter key to open with the $EDITOR fo() { # Use process substitution to capture fzf output IFS=$'\n' read -r -d '' key file < /dev/null 2>&1; then xdg-open "$file" # For Linux elif command -v open > /dev/null 2>&1; then open "$file" # For macOS else echo "No suitable 'open' command found." fi else ${EDITOR:-vim} "$file" fi fi }