From 06d2dcc8fc8f29c452f0a0851efc00c89e0e3137 Mon Sep 17 00:00:00 2001 From: Andreas Hrubak Date: Mon, 21 Oct 2024 11:27:33 +0200 Subject: [PATCH] improve cred --- user-tools/cred | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/user-tools/cred b/user-tools/cred index 9e4ce27..7b54fd8 100755 --- a/user-tools/cred +++ b/user-tools/cred @@ -53,37 +53,40 @@ B, B, B, B, B, B, B. =item generate-password -Generate a new password and put in B property. -And append its old value to the B property. +Generate a new password and put in B property; +append its old value to the B property; +copy the new one to the clipboard. =item list-props =item prop I [set I | edit | read | del | show | reveal | clip] Manage properties of a given site. -The B instruction opens up the B<$EDITOR> (falling back to B<$VISUAL>) to edit the given property's value. -B reads the new value from the STDIN (readline is supported if bash does support it, see C in bash(1)). -Secrets are read in no-echo mode. -B shows only non-secrets. -Enter B to show secrets as well. -By B you may copy the value to the clipboard. -If you use CopyQ(1), secrets are prevented to get to CopyQ's clipboard items history. +See individual instruction descriptions at the subcommands below which are aliases to these B commands. =item set I I =item edit I +Open up the B<$EDITOR> (falling back to B<$VISUAL>) to edit the given property's value. =item read I +Read the new value from the STDIN (readline is supported if bash does support it, see C in bash(1)). +Secrets are read in no-echo mode. + =item del I =item show I =item reveal I +Subcommand B shows only non-secrets. +Enter B to show secrets as well. + =item clip I -These subcommands do the same as B subcommand's instructions, see above. +By B you may copy the value to the clipboard. +If you use CopyQ(1), secrets are prevented to get to CopyQ's clipboard items history. =item fill-form I [I [...]] @@ -99,7 +102,7 @@ Depends on xdotool(1). =head1 FILES -Hardcoded credentials' directory is F<~/cred>. +Credentials directory is hardcoded to F<~/cred>. =head1 SEE ALSO @@ -352,6 +355,7 @@ case "$subcmd" in echo "$atime $now $cur_pwd" >> "$basedir/$site/OLDPASSWORDS" fi printf '%s' "$newpwd" > "$pwdfile" + printf '%s' "$newpwd" | do_clip PASSWORD ;; (compscript) cat <<'EOF' -- 2.11.4.GIT