From 4fb02ed30be70173ffc161917491743c37c97dba Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Sun, 17 Sep 2017 15:01:53 +0300 Subject: [PATCH] replace nc with remote flag in the documentation --- doc.go | 11 ++--------- docstring.go | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/doc.go b/doc.go index d38b9455..71b2898b 100644 --- a/doc.go +++ b/doc.go @@ -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. Setting the file selection is done with 'save' command: - nc -U /tmp/lf.${USER}.sock << 'EOF' - save - copy - foo.txt - bar.txt - baz.txt - - EOF + lf -remote "$(printf 'save\ncopy\nfoo.txt\nbar.txt\nbaz.txt\n')" 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') list=$(echo "$resp" | sed '1d') if [ $mode = 'copy' ]; then diff --git a/docstring.go b/docstring.go index 37dabdcf..d86b8705 100644 --- a/docstring.go +++ b/docstring.go @@ -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 newline character. Setting the file selection is done with 'save' command: - nc -U /tmp/lf.${USER}.sock << 'EOF' - save - copy - foo.txt - bar.txt - baz.txt - - EOF + lf -remote "$(printf 'save\ncopy\nfoo.txt\nbar.txt\nbaz.txt\n')" 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') list=$(echo "$resp" | sed '1d') if [ $mode = 'copy' ]; then