add documentation for remote commands

Mentioned in #36.
This commit is contained in:
Gokcehan committed 2017-02-11 16:14:41 +03:00
1 parent 46a4378531
commit de1168fb96
3 files changed
+191 -1

No files matched your search

+19 -1
View File
@@ -69,7 +69,13 @@ cmd open-file ${{
}}
# rename current file without overwrite
cmd rename $[ -e "$1" ] || mv "$f" "$1"
cmd rename ${{
if [ -e "$1" ]; then
lf -remote "send $id echo file exists"
else
mv "$f" "$1"
fi
}}
map r push :rename<space>
# show disk usage
@@ -104,3 +110,15 @@ cmd compress ${{
tar czvf "$1.tar.gz" "$1"
rm -rf "$1"
}}
# dynamically set the number of columns on startup based on terminal width
${{
w=$(tput cols)
if [ $w -le 80 ]; then
lf -remote "send $id set ratios 1:2"
elif [ $w -le 160 ]; then
lf -remote "send $id set ratios 1:2:3"
else
lf -remote "send $id set ratios 1:2:3:4"
fi
}}