We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6d35a1 commit 58751aeCopy full SHA for 58751ae
1 file changed
memo
@@ -29,14 +29,16 @@ check_tmpdir() {
29
join_by() { local IFS="$1"; shift; echo "$*"; }
30
31
_copy() {
32
- read -q ans?"Copy to clipboard? "
33
echo
+ read -q ans?"Copy to clipboard? "
34
+ _cleanup
35
[ "$ans" = n ] && return 0
36
command -v xc &>/dev/null || return 1
37
printf "${1:gs/%/%%}" | xc && echo "Copied!"
38
}
39
40
show() {
41
+ echo
42
local list="$1"
43
local c=`echo -E "$list" | wc -l`
44
if (( $c > 1 )); then
@@ -50,12 +52,17 @@ show() {
50
52
fi
51
53
54
55
+_cleanup() {
56
+ printf "\r[K"
57
+}
58
+
59
_memo_get() {
60
check_memo
61
check gpg
62
63
if (( ! $# )); then
64
local list=(`gpg -qd $memo | cut -d' ' -f1`)
65
66
echo ${list[@]}
67
elif (( $# == 1 )); then
68
local list="`gpg -qd $memo | grep -iE ^$1`"
0 commit comments