i only use clippy with file content, not file name

usefull with snippet like:
$(pwgen -s 32 1)
This commit is contained in:
BarbUk 2017-01-29 02:43:23 +04:00
parent 11862dc492
commit 36ccda5f30

7
snippy
View File

@ -80,12 +80,7 @@ run(){
else else
content="$(bashdown < "${DIR}/${FILE}")" content="$(bashdown < "${DIR}/${FILE}")"
fi fi
# clip launch copyq, don't pass the filename in buffer printf "%s" "$content" > $TMPFILE
if [[ ! ${FILE} == "clip" ]] && [[ "${#content}" == 0 ]]; then
printf "%s" "${FILE}" > $TMPFILE
else
printf "%s" "$content" > $TMPFILE
fi
else else
${FILE} &> $TMPFILE # execute as bashcommand ${FILE} &> $TMPFILE # execute as bashcommand
fi fi