spm

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

Commit: c2052397e66d3bdeab5a9bf210b6be89699b7b57
Parent: c4e42c23dfb998696fe0d39cae424bfb59ea2396
Author: Randy Palamar
Date:   Sun, 15 Jan 2023 12:25:09 -0700

remove munge() fn its not really useful

Diffstat:
Mspm | 14+-------------
1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/spm b/spm @@ -59,17 +59,6 @@ find() { command find "${STORE_DIR}" -type f -o -type l | grep -ie "${1}" } -munge() { - abspath="$(readlink -f "${STORE_DIR}"/"${1}")" - case "${abspath}" in - "${STORE_DIR}"*) - echo "${abspath#${STORE_DIR}/}" - ;; - *) - usage 'bad traversal' - esac -} - view() { less -EiKRX } @@ -123,8 +112,7 @@ add|del|search|show) list) [ "${2:-}" = -g ] && gflag=1 && shift 1 [ ${#} -gt 2 ] && usage 'too many arguments' - [ -n "${2:-}" ] && relpath=$(munge "${2}") - list "${relpath:-}" + list "${2:-.}" ;; help) usage