spm

simple password manager
git clone anongit@rnpnr.xyz:spm.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 63ad458e6e031c585f9ebc86de2d0abbc0214cf9
Parent: 3b43ce5322903886e10f58226cb91a5c0c135607
Author: Klemens Nanni
Date:   Thu, 30 Jun 2016 11:41:45 +0200

Remove colors from 'search', add example to manpage

In case colors are desired, simply use spm in combination with grep(1)
or similar:

	pwsearch() {
		spm search "${1}" | grep --color=always "${1}"
	}

Diffstat:
MREADME.pod | 4++++
Mspm.sh | 8++------
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/README.pod b/README.pod @@ -108,6 +108,10 @@ List groups only: $ spm list -g +Show all entries matching the pattern 'sys': + + $ spm search sys + =head1 SEE ALSO git(1), gpg2(1), ln(1), pwgen(1), tpm(1), xclip(1) diff --git a/spm.sh b/spm.sh @@ -49,8 +49,7 @@ readpw() { } _search() { - find "${STORE_DIR}"/ \( -type f -o -type l \) \ - -iwholename "*${1}*".gpg + find "${STORE_DIR}"/ \( -type f -o -type l \) -iwholename "*${1}*".gpg } view() { @@ -85,10 +84,7 @@ del() { } search() { - _search "${1}" \ - | sed "s^${STORE_DIR}/; - s${1}\x1B\[01;31m${1}\x1B[00mg" \ - | view + _search "${1}" | view } show() {