This commit is contained in:
committer
2024-05-31 16:12:00 -05:00
parent 1511602606
commit 126fd0fb51

View File

@@ -63,11 +63,20 @@ cmd cds :cd /home/poq/syncDir
# text files and a file opener for the rest. # text files and a file opener for the rest.
cmd open &{{ cmd open &{{
case $(file --mime-type -Lb $f) in case $(file --mime-type -Lb $f) in
text/*) lf -remote "send $id \$$EDITOR \$fx";; # text/*) lf -remote "send $id \$$EDITOR \$fx";;
text/*) helix \$fx";;
*) for f in $fx; do $OPENER $f > /dev/null 2> /dev/null & done;; *) for f in $fx; do $OPENER $f > /dev/null 2> /dev/null & done;;
esac esac
}} }}
#cmd open ${{
# test -L $f && f=$(readlink -f $f)
# case $(file --mime-type $f -b) in
# text/*) geany $fx;;
# *) for f in $fx; do xdg-open $f > /dev/null 2> /dev/null & done;;
# esac
# }}
# define a custom 'rename' command without prompt for overwrite # define a custom 'rename' command without prompt for overwrite
# cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1 # cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1
# map r push :rename<space> # map r push :rename<space>