From b5e62d7ceb3c18b7c62df472e77f4c0262f196a7 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 5 Jan 2019 10:57:11 +0530 Subject: Document picker behaviour --- scripts/user-scripts/copier.sh | 5 +++++ scripts/user-scripts/picker.sh | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'scripts/user-scripts') diff --git a/scripts/user-scripts/copier.sh b/scripts/user-scripts/copier.sh index 391770c..a99b88b 100755 --- a/scripts/user-scripts/copier.sh +++ b/scripts/user-scripts/copier.sh @@ -1,5 +1,10 @@ #!/usr/bin/env sh +# Description: Copy selection to clipboard +# +# Shell: generic +# Author: Arun Prakash Jana + # Linux cat ~/.nnncp | xargs -0 | xsel -bi diff --git a/scripts/user-scripts/picker.sh b/scripts/user-scripts/picker.sh index 8885ed6..e69159e 100644 --- a/scripts/user-scripts/picker.sh +++ b/scripts/user-scripts/picker.sh @@ -2,7 +2,7 @@ # Description: Pick files and pipe the line-separated list to another utility # -# Shell: sh +# Shell: generic # Author: Arun Prakash Jana # # Usage: @@ -17,5 +17,8 @@ # NOTE: This use case is limited to picking files, other functionality may not work as expected. nnn -p /tmp/picked -cat /tmp/picked | tr '\0' '\n' -rm /tmp/picked + +if [ -f /tmp/picked ]; then + cat /tmp/picked | tr '\0' '\n' + rm /tmp/picked +fi -- cgit v1.2.3-70-g09d2