dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 1f0298ae65d4dd926663df1fee3b511bc0a9a0ce
parent e8348b10eec751453c1504c43196618a1ab32531
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Thu,  7 Nov 2019 00:43:46 -0500

lf: zip mapping

Former-commit-id: 43823d2d6160520d4f7c250ffdd03046cbaed60a
Diffstat:
Mlf/lfrc | 27+++++++++------------------
1 file changed, 9 insertions(+), 18 deletions(-)

diff --git a/lf/lfrc b/lf/lfrc @@ -64,24 +64,6 @@ cmd extract ${{ esac }} -# 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 -}} - cmd copy_path ${{ set -f if command -v pbcopy > /dev/null 2> /dev/null; then @@ -90,6 +72,13 @@ cmd copy_path ${{ echo "$f" | tr -d '\n' | xclip -sel clip fi }} +cmd zip ${{ + set -f + mkdir $f-zip + cp -r $fx $f-zip + (cd $f-zip/ && zip -r $f.zip .) + rm -rf $f-zip/ +}} cmd paste_link %{{ load=$(lf -remote 'load') mode=$(echo "$load" | sed -n '1p') @@ -148,3 +137,5 @@ map cd push %mkdir<space> map e map ee $$EDITOR $f map ec edit_config + +map tz zip