File tree Expand file tree Collapse file tree 1 file changed +27
-3
lines changed
Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -115,15 +115,39 @@ note-import() {
115115 fi
116116}
117117
118+ note-view () {
119+ notefile=" $USE_POINTER /$@ "
118120
121+ get_recipient
122+
123+ if [ -f " ${notefile} " ]; then
124+ gpg -d " ${notefile} " | ${PAGER:- more}
125+ elif [ -f " ${notefile} .gpg" ]; then
126+ gpg -d " ${notefile} .gpg" | ${PAGER:- more}
127+ else
128+ echo Note file does not exist
129+ fi
130+ }
119131
120- note-view () {
132+ note-edit () {
121133 notefile=" $USE_POINTER /$@ "
134+ decrypted=" ` echo ${notefile} | sed s/.gpg//` "
135+
136+ get_recipient
137+
138+ echo $notefile
139+ echo $decrypted
122140
123141 if [ -f " $notefile " ]; then
124- gpg -d " $notefile " | ${PAGER:- more}
142+ gpg -d -o " ${decrypted} " " ${notefile} "
143+ ${EDITOR} " ${decrypted} "
144+ $GPG -e -r $KEY $GPG_OPTS " ${decrypted} "
145+ rm ${decrypted}
125146 elif [ -f " ${notefile} .gpg" ]; then
126- gpg -d " ${notefile} .gpg" | ${PAGER:- more}
147+ gpg -d -o " ${decrypted} " " ${notefile} .gpg"
148+ ${EDITOR} " ${decrypted} "
149+ $GPG -e -r $KEY $GPG_OPTS " ${decrypted} "
150+ rm ${decrypted}
127151 else
128152 echo Note file does not exist
129153 fi
You can’t perform that action at this time.
0 commit comments