Can I use nano exclusively in lf? #1930
-
I know that lf uses xdg to open files, but for ssh and generally for not having to leave a terminal to edit one line I want lf to open text files with nano, without changing global xdg default. Is it possible? |
Beta Was this translation helpful? Give feedback.
Answered by
DusanLesan
Mar 13, 2025
Replies: 2 comments
-
Yes, you need to override the open command. This is an example of how it should look like: cmd open ${{
type="$(file --mime-type "$f" -b)"
case "$type" in
text/*) nano "$f" ;;
*) for f in $fx; do setsid "$OPENER" "$f" >/dev/null 2>&1 & done ;;
esac
}} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Damglador
-
Thank you! |
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
Yes, you need to override the open command. This is an example of how it should look like: