4 Commits

Author SHA1 Message Date
  Luke Smith a8863a750a
Merge pull request #958 from jdujava/master 1 year ago
  Luke Smith 7a1fe918a1
Merge pull request #953 from rampaq/pipe-to-pass 1 year ago
  Jonas Dujava 8d78212cad fix: reorder action 1 year ago
  Tomáš Faikl (astro) 268da5d51b pipe password directly to pass 1 year ago
1 changed files with 4 additions and 10 deletions
Unified View
  1. +4
    -10
      bin/mw

+ 4
- 10
bin/mw View File

@@ -174,20 +174,14 @@ askinfo() {
hostname="${fulladdr#*@}" hostname="${fulladdr#*@}"
login="${login:-$fulladdr}" login="${login:-$fulladdr}"
if [ -n "${password+x}" ]; then if [ -n "${password+x}" ]; then
createpass
insertpass
else else
getpass getpass
fi fi
} }


createpass() {
echo "$password" >"$PASSWORD_STORE_DIR/$passprefix$fulladdr"
"$GPG" -qe $(printf -- " -r %s" $(cat "$PASSWORD_STORE_DIR/.gpg-id")) "$PASSWORD_STORE_DIR/$passprefix$fulladdr"
case "$(uname)" in
Darwin | *BSD) rm -P "$PASSWORD_STORE_DIR/$passprefix$fulladdr" ;;
*) shred -u "$PASSWORD_STORE_DIR/$passprefix$fulladdr" ;;
esac
rm -f "$PASSWORD_STORE_DIR/$passprefix$fulladdr"
insertpass() {
printf "%s" "$password" | pass insert -fe "$PASSWORD_STORE_DIR/$passprefix$fulladdr"
} }


errorexit() { errorexit() {
@@ -328,7 +322,7 @@ reorder() {


while getopts "rfpXlhodTYD:y:i:I:s:S:u:a:n:P:x:m:t:" o; do case "${o}" in while getopts "rfpXlhodTYD:y:i:I:s:S:u:a:n:P:x:m:t:" o; do case "${o}" in
l) setact list ;; l) setact list ;;
r) setact reorder1 ;;
r) setact reorder ;;
d) setact delete ;; d) setact delete ;;
D) D)
setact delete setact delete


Loading…
Cancel
Save