2020-04-19 02:57:30 +00:00
|
|
|
set shell sh
|
|
|
|
set shellopts '-eu'
|
|
|
|
set ifs "\n"
|
2020-10-05 13:30:26 +00:00
|
|
|
set drawbox true
|
2020-04-19 02:57:30 +00:00
|
|
|
set hidden
|
|
|
|
|
|
|
|
set color256
|
|
|
|
set timefmt "2006-01-02 15:04:05"
|
|
|
|
set dircounts
|
|
|
|
set scrolloff 10
|
|
|
|
|
2023-07-25 10:25:51 +00:00
|
|
|
set wrapscroll true
|
2020-04-19 02:57:30 +00:00
|
|
|
|
2023-07-25 10:25:51 +00:00
|
|
|
# interactive delete command with a prompt since it is easy to delete them
|
2020-04-19 02:57:30 +00:00
|
|
|
cmd delete ${{
|
|
|
|
set -f
|
|
|
|
printf "$fx\n"
|
|
|
|
printf "delete?[y/n]"
|
|
|
|
read ans
|
|
|
|
[ $ans = "y" ] && rm -rf $fx
|
|
|
|
}}
|
|
|
|
|
|
|
|
# compress current file or selected files with tar and gunzip
|
|
|
|
cmd tar ${{
|
|
|
|
set -f
|
|
|
|
mkdir $1
|
|
|
|
cp -r $fx $1
|
|
|
|
tar czf $1.tar.gz $1
|
|
|
|
rm -rf $1
|
|
|
|
}}
|
|
|
|
|
|
|
|
# compress current file or selected files with zip
|
|
|
|
cmd zip ${{
|
|
|
|
set -f
|
|
|
|
mkdir $1
|
|
|
|
cp -r $fx $1
|
|
|
|
zip -r $1.zip $1
|
|
|
|
rm -rf $1
|
|
|
|
}}
|
|
|
|
|
|
|
|
map D delete
|
2023-07-25 10:25:51 +00:00
|
|
|
map T tar
|
2020-04-19 02:57:30 +00:00
|
|
|
map <enter> shell
|
2023-07-25 10:25:51 +00:00
|
|
|
map gr cd /
|
2020-04-19 02:57:30 +00:00
|
|
|
map x $$f
|
|
|
|
map X !$f
|
|
|
|
|
2023-07-25 10:25:51 +00:00
|
|
|
cmap <tab> cmd-menu-complete
|
|
|
|
cmap <backtab> cmd-menu-complete-back
|