replace nc with remote flag in the documentation

This commit is contained in:
Gokcehan 2017-09-17 15:01:53 +03:00
parent 466829e73b
commit 4fb02ed30b
2 changed files with 4 additions and 18 deletions

11
doc.go
View File

@ -310,18 +310,11 @@ file selection. Two possible modes 'copy' and 'move' specify whether selected
files are to be copied or moved. File names are separated by newline character. files are to be copied or moved. File names are separated by newline character.
Setting the file selection is done with 'save' command: Setting the file selection is done with 'save' command:
nc -U /tmp/lf.${USER}.sock << 'EOF' lf -remote "$(printf 'save\ncopy\nfoo.txt\nbar.txt\nbaz.txt\n')"
save
copy
foo.txt
bar.txt
baz.txt
EOF
Getting the file selection is similarly done with 'load' command: Getting the file selection is similarly done with 'load' command:
resp=$(echo 'load' | nc -U /tmp/lf.${USER}.sock) resp=$(lf -remote 'load')
mode=$(echo "$resp" | sed -n '1p') mode=$(echo "$resp" | sed -n '1p')
list=$(echo "$resp" | sed '1d') list=$(echo "$resp" | sed '1d')
if [ $mode = 'copy' ]; then if [ $mode = 'copy' ]; then

View File

@ -323,18 +323,11 @@ current file selection. Two possible modes 'copy' and 'move' specify whether
selected files are to be copied or moved. File names are separated by selected files are to be copied or moved. File names are separated by
newline character. Setting the file selection is done with 'save' command: newline character. Setting the file selection is done with 'save' command:
nc -U /tmp/lf.${USER}.sock << 'EOF' lf -remote "$(printf 'save\ncopy\nfoo.txt\nbar.txt\nbaz.txt\n')"
save
copy
foo.txt
bar.txt
baz.txt
EOF
Getting the file selection is similarly done with 'load' command: Getting the file selection is similarly done with 'load' command:
resp=$(echo 'load' | nc -U /tmp/lf.${USER}.sock) resp=$(lf -remote 'load')
mode=$(echo "$resp" | sed -n '1p') mode=$(echo "$resp" | sed -n '1p')
list=$(echo "$resp" | sed '1d') list=$(echo "$resp" | sed '1d')
if [ $mode = 'copy' ]; then if [ $mode = 'copy' ]; then