You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local file=$(ag --hidden --nonumbers --noheading . | fzf | cut -d ':' -f1)
if [ -n "$file" ]; then
# Use the default editor if it's defined, otherwise Vim
${EDITOR:-vim} "$file"
fi
This works fine for most files, but breaks for files with colons in their names. Here's an example setup:
Hi and thanks a lot for ag!
I use fzf with ag to open files in a text editor:
This works fine for most files, but breaks for files with colons in their names. Here's an example setup:
Typing "Find" and hitting enter,
cut
turns "file:with:colons:Find me" into "file", which is not the file I intended to open.I know about ag's
--files-with-matches
but I do want to see the matched lines in fzf.Is there a way around this issue?
The text was updated successfully, but these errors were encountered: