suppress '.enc' from list output

Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/kanako/trunk@19 62e5d677-aa6e-8c4a-b8cb-b9416171cb8e
This commit is contained in:
yakumo.izuru 2023-09-10 18:12:36 +00:00
parent 8fcbaa3e98
commit f91ef7d89c

4
kanako
View File

@ -32,7 +32,7 @@ edit() {
rm "${1%%.enc}"
}
list() {
$(which tree) "${kanako_store_dir}/"
$(which tree) "${kanako_store_dir}/" | sed 's/\.enc//g'
}
new() {
test -d $1 && usage && exit 1
@ -59,7 +59,7 @@ view() {
if [ -f "${1%%.enc}".enc ]; then
${kanako_encrypt_cmd} ${kanako_decrypt_args} "${1%%.enc}".enc
elif [ -d "${1:-.}" ]; then
$(which tree) "${1:-.}"
$(which tree) "${1:-.}" | sed 's/\.enc//g'
else
usage
fi