spm

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

Commit: d239c4d951755ddd934efad8dc4c3cb13da38294
Parent: de26bd28d4862d7776a192a746c1da13958cfb2b
Author: Klemens Nanni
Date:   Sat, 18 Jun 2016 14:49:38 +0200

Show relative paths and use colors in 'search'

Only the null character (\0) and forward slash (/) must not be in UNIX
filenames, thus a control character () is used as delimiter in sed(1)
to guarantee that the content of ${STORE_DIR} may not break sed's
syntax.

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

diff --git a/README.pod b/README.pod @@ -13,8 +13,8 @@ I<add>, I<del> or I<show> command respectively followed by a name. spm will then prompt for a password or confirmation before it modifies or shows the corresponding entry. -Basic searching is possible through the I<search> command and yields -absoloute paths to eventually found entries. +Basic searching is possible through the I<search> command and will show +matching menu entries accordingly. Globbing is allowed for I<del>, I<search> and I<show> to avoid typing potentially long entry names. In case multiple entries match, spm exits diff --git a/spm.sh b/spm.sh @@ -86,6 +86,8 @@ del() { search() { _search "${1}" \ + | sed "s^${STORE_DIR}/; + s${1}\x1B\[01;31m${1}\x1B[00mg" \ | view }