X-Git-Url: http://www.git.stargrave.org/?p=t.git;a=blobdiff_plain;f=t;h=a1fcfc5ecf353914de6403b5f34dd897180a60c1;hp=ed74f3043210b55b9d3dcbe28ba2cbcaccaabb6e;hb=HEAD;hpb=ab14d56c08a09956ac3360c45987b4966ba95647 diff --git a/t b/t index ed74f30..1695e88 100755 --- a/t +++ b/t @@ -1,7 +1,7 @@ #!/usr/bin/env zsh # t -- simple notes manager -# Copyright (C) 2013-2022 Sergey Matveev -# Current version is written on zsh. Previous was on POSIX shell. +# Copyright (C) 2013-2024 Sergey Matveev +# Current version is written on Z shell. Previous was on POSIX shell. # # Usage: # * t -- just briefly print all notes: their number and stripped first @@ -25,8 +25,7 @@ # $ t # [0] some earlier default namespace note (1) -set -e -setopt NULL_GLOB +setopt ERR_EXIT NULL_GLOB NOTES_DIR=$HOME/.t/$N NOTES_DIR=${NOTES_DIR%/} @@ -51,7 +50,7 @@ get_note() { [[ ${#line} -le 70 ]] || print -n "... " lines=$(wc -l < $note) printf "(%d)\n" $lines - ctr=$(( ctr + 1 )) + (( ctr = ctr + 1 )) } exit }