dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 53fb670d6b9a8cd46d239b375f26d3b4981c986e
parent 443c9b94a89f193dd8df0fa877cc85fbc87f9fc3
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon,  3 Feb 2020 15:17:04 +0100

Strip extension from pass files in output

Diffstat:
M.local/bin/passmenu | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.local/bin/passmenu b/.local/bin/passmenu @@ -59,7 +59,7 @@ strip_root_dir() match_password_file() { local _passfile, _passfiles - _passfiles="$(get_password_files | strip_root_dir)" + _passfiles="$(get_password_files | strip_root_dir | sed 's/\.gpg$//')" if [ "$#" -gt 0 ]; then _passfile="$(printf '%s' "$_passfiles" | grep -i "$@")" if [ "$(printf '%s\n' "$_passfile" | wc -l)" -eq 0 ]; then @@ -73,7 +73,7 @@ match_password_file() die 'aborted by user' fi fi - if [ ! -r "$pass_dir/$_passfile" ]; then + if [ ! -r "${pass_dir}/${_passfile}.gpg" ]; then die "no password file: $pass_dir/$_passfile" fi printf '%s\n' "$_passfile"