Skip to content

Commit 58751ae

Browse files
committed
memo: Add some visual separation and cleanup
1 parent d6d35a1 commit 58751ae

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

memo

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@ check_tmpdir() {
2929
join_by() { local IFS="$1"; shift; echo "$*"; }
3030

3131
_copy() {
32-
read -q ans?"Copy to clipboard? "
3332
echo
33+
read -q ans?"Copy to clipboard? "
34+
_cleanup
3435
[ "$ans" = n ] && return 0
3536
command -v xc &>/dev/null || return 1
3637
printf "${1:gs/%/%%}" | xc && echo "Copied!"
3738
}
3839

3940
show() {
41+
echo
4042
local list="$1"
4143
local c=`echo -E "$list" | wc -l`
4244
if (( $c > 1 )); then
@@ -50,12 +52,17 @@ show() {
5052
fi
5153
}
5254

55+
_cleanup() {
56+
printf "\r"
57+
}
58+
5359
_memo_get() {
5460
check_memo
5561
check gpg
5662

5763
if (( ! $# )); then
5864
local list=(`gpg -qd $memo | cut -d' ' -f1`)
65+
echo
5966
echo ${list[@]}
6067
elif (( $# == 1 )); then
6168
local list="`gpg -qd $memo | grep -iE ^$1`"

0 commit comments

Comments
 (0)