Replies: 2 comments
-
result=$(fzf --exact --walker-root / --walker-skip proc,tmp,run --preview 'batcat --color=always {}'); test -n "$result" && { test -w "$result" && nano "$result" || sudo nano "$result"; } |
Beta Was this translation helpful? Give feedback.
0 replies
-
See https://github.com/junegunn/fzf?tab=readme-ov-file#turning-into-a-different-process |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to open documents with nano, except when I press ctrl+c or/and ESC.
I try this, but always open nano:
fzf -e --walker-root / --walker-skip proc,tmp,run --preview 'batcat --color=always {}' --preview-window '~3' --print0 | xargs -0 -o nano
I try this method, but doesnt open any document:
fzf -e --walker-root / --walker-skip proc,tmp,run --preview 'batcat --color=always {}' --preview-window '~3' --print0 | test $? -eq 0 && xargs -0 -o nano
Beta Was this translation helpful? Give feedback.
All reactions