commit 6ef0dab90a7bcfde02815cd4805e6243d7ca09d4
parent fdec6773a9c0242e9f9f520d64ed0f75646d9e95
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Tue, 28 Apr 2020 14:21:50 +0200
lf: trying to set up open correctly
Former-commit-id: 18b8b8836de89e90dfbf41acbca19a9b76336a64
Diffstat:
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lf/lfrc b/lf/lfrc
@@ -28,9 +28,10 @@ set previewer ~/.config/lf/preview.sh
# }}}
# Command definitions {{{
# define a custom 'open' command
-cmd _open &{{
+cmd open &{{
case $(file --mime-type "$f" -b) in
- text/*|application/json) $EDITOR $fx;;
+ text/*) $EDITOR $f;;
+ application/json) $EDITOR $f;;
application/epub+zip) ebook-viewer $fx >/dev/null 2>&1 & disown;;
*) for f in $fx; do $OPENER "$f" > /dev/null 2> /dev/null & disown; done;;
esac
@@ -174,7 +175,7 @@ map X !$f
# dedicated keys for file opener actions
map o
map O
-map o :_open $fx
+map o &open $fx
map O push hol
map v ql_preview
map r reload
@@ -195,7 +196,7 @@ map R push :rename<space>
map cw push :rename<space>
map E $$EDITOR $f
map D delete
-map <enter> :_open $fx
+map <enter> &open $fx
map S shell
map Y copy_path