From 3e9f1d8c94a9245f4a1b73201b0c8601ef0bd67e Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 5 Oct 2023 17:28:29 +0200 Subject: [PATCH] update reactiontag --- .config/zsh/functions/reactiontag | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.config/zsh/functions/reactiontag b/.config/zsh/functions/reactiontag index fd11692..2b063e0 100755 --- a/.config/zsh/functions/reactiontag +++ b/.config/zsh/functions/reactiontag @@ -3,7 +3,7 @@ setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL -if [[ ! -v 1]]; then +if [[ ! -v 1 ]]; then print -u 2 "usage: ${0} " return 1 fi @@ -11,8 +11,11 @@ file=${1} zmodload zsh/attr -read -r -d  '?source: ' source +read -r '?source: ' source zsetattr ${file} user.source ${source} -read -r -d  '?description: ' description -zsetattr ${file} user.description ${description} +tmpfile==() +print "enter description, save and exit editor" > ${tmpfile} +eval ${VISUAL} ${tmpfile} +zsetattr ${file} user.description "$(<${tmpfile})" +rm ${tmpfile}