From ayush at fastmail.in Mon Oct 4 17:05:45 2021 From: ayush at fastmail.in (Ayush Agarwal) Date: Mon, 04 Oct 2021 22:35:45 +0530 Subject: =?UTF-8?Q?pass-coffin_-_an_extension_to_hide_password_store_data, _like_p?= =?UTF-8?Q?ass-tomb?= Message-ID: <0d7d8e5d-8de3-49b7-a489-535481fb0220@www.fastmail.com> Hey everyone, I've made another extension for pass, pass-coffin, which hides password store data using GPG. https://github.com/ayushnix/pass-coffin Unlike pass-tomb, pass-coffin doesn't depend on a 3k+ line ZSH script^1 and doesn't need root access^2 to work. It simply uses GPG to encrypt the entire password store tree into a single encrypted tar file. I also didn't like the code quality of pass-grave so I thought about making this extension. Needless to say, pass-coffin is heavily inspired from pass-tomb and pass-grave. Any comments or critiques on the code are welcome. 1: https://github.com/dyne/Tomb/blob/master/tomb 2: https://github.com/roddhjav/pass-tomb/issues/19#issuecomment-395232044 Regards, Ayush From roni at kallio.app Wed Oct 20 12:23:45 2021 From: roni at kallio.app (Roni Kallio) Date: Wed, 20 Oct 2021 15:23:45 +0300 Subject: [PATCH] Satisfy Emacs byte-compiler Message-ID: <87zgr3odbo.fsf@kallio.app> Motivation for the patch: Get the byte-compiler to shut up when native-compiling third party elisp packages. For unused lexical variable warnings: prepend the variable with _, or remove in case the variable is truly unnecessary. For docstring width warnings: reflow the docstring. The patch fixes the following warnings in the output of `byte-compile-file`: In password-store--run-1: password-store.el:87:31: Warning: Unused lexical argument `process' In password-store--run: password-store.el:105:18: Warning: Unused lexical variable `slept-for' In password-store--run-list: password-store.el:125:44: Warning: Unused lexical argument `subdir' In password-store--run-grep: password-store.el:128:44: Warning: Unused lexical argument `string' In password-store--run-find: password-store.el:131:44: Warning: Unused lexical argument `string' In password-store--run-insert: password-store.el:139:61: Warning: Unused lexical argument `entry' password-store.el:139:61: Warning: Unused lexical argument `password' password-store.el:139:61: Warning: Unused lexical argument `force' In password-store-get-field: password-store.el:242:8: Warning: docstring wider than 80 characters In password-store-copy-field: password-store.el:299:8: Warning: docstring wider than 80 characters --- contrib/emacs/password-store.el | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/contrib/emacs/password-store.el b/contrib/emacs/password-store.el index 61c339e..d489a8a 100644 --- a/contrib/emacs/password-store.el +++ b/contrib/emacs/password-store.el @@ -84,7 +84,7 @@ or outputs error message on failure." :command (cons password-store-executable (delq nil args)) :connection-type 'pipe :noquery t - :filter (lambda (process text) + :filter (lambda (_process text) (setq output (concat output text))) :sentinel (lambda (process state) (cond @@ -98,8 +98,7 @@ or outputs error message on failure." Nil arguments are ignored. Returns the output on success, or outputs error message on failure." - (let ((output nil) - (slept-for 0)) + (let ((output nil)) (apply #'password-store--run-1 (lambda (password) (setq output password)) (delq nil args)) @@ -122,13 +121,13 @@ Nil arguments are ignored. Output is discarded." (if folder (format "--path=%s" folder)) gpg-ids)) -(defun password-store--run-list (&optional subdir) +(defun password-store--run-list (&optional _subdir) (error "Not implemented")) -(defun password-store--run-grep (&optional string) +(defun password-store--run-grep (&optional _string) (error "Not implemented")) -(defun password-store--run-find (&optional string) +(defun password-store--run-find (&optional _string) (error "Not implemented")) (defun password-store--run-show (entry &optional callback) @@ -136,7 +135,7 @@ Nil arguments are ignored. Output is discarded." (password-store--run-1 callback "show" entry) (password-store--run "show" entry))) -(defun password-store--run-insert (entry password &optional force) +(defun password-store--run-insert (_entry _password &optional _force) (error "Not implemented")) (defun password-store--run-edit (entry) @@ -241,9 +240,13 @@ When CALLBACK is non-`NIL', call CALLBACK with the first line instead." ;;;###autoload (defun password-store-get-field (entry field &optional callback) "Return FIELD for ENTRY. -FIELD is a string, for instance \"url\". -When CALLBACK is non-`NIL', call it with the line associated to FIELD instead. -If FIELD equals to symbol secret, then this function reduces to `password-store-get'." +FIELD is a string, for instance \"url\". + +When CALLBACK is non-`NIL', call it with the line associated to +FIELD instead. + +If FIELD equals to symbol secret, then this function reduces to +`password-store-get'." (let* ((inhibit-message t) (secret (auth-source-pass-get field entry))) (if (not callback) secret @@ -302,7 +305,9 @@ after `password-store-time-before-clipboard-restore' seconds." Clear previous secret from the kill ring. Pointer to the kill ring is stored in `password-store-kill-ring-pointer'. Secret field is cleared after `password-store-timeout' seconds. -If FIELD equals to symbol secret, then this function reduces to `password-store-copy'." + +If FIELD equals to symbol secret, then this function reduces to +`password-store-copy'." (interactive (let ((entry (password-store--completing-read))) (list entry (password-store-read-field entry)))) -- Roni Kallio From mitchell.negus.57 at gmail.com Fri Oct 22 20:04:43 2021 From: mitchell.negus.57 at gmail.com (Mitch) Date: Fri, 22 Oct 2021 14:04:43 -0600 Subject: Question: Printing and Clipping Password Info Message-ID: Hi all, I frequently find myself looking to use the clip option in addition to printing other login information (e.g. username). As far as I can tell from the man page, this seems to be an either/or. I'm sure I could whip up a hack to do this in one shot, but before I go that route I wanted to poll the community to see if this is something that there is already a good solution for (especially an obvious one that I've overlooked?) Thanks for the awesome tool! -Mitch From minshall at umich.edu Sat Oct 23 08:23:33 2021 From: minshall at umich.edu (Greg Minshall) Date: Sat, 23 Oct 2021 11:23:33 +0300 Subject: Question: Printing and Clipping Password Info In-Reply-To: References: Message-ID: <1318784.1634977413@apollo2.minshall.org> Mitch, i think you could: ---- pass fubar | \ tee >(awk 'NR > 1 {print}' > /dev/tty) | \ awk 'NR == 1 { print }' | \ xclip -i -selection clipboard ---- (YSMV == your shell may vary). cheers, Greg From ayush at fastmail.in Sat Oct 23 15:00:25 2021 From: ayush at fastmail.in (Ayush Agarwal) Date: Sat, 23 Oct 2021 20:30:25 +0530 Subject: Question: Printing and Clipping Password Info In-Reply-To: References: Message-ID: <1d0e1e61-784c-4c89-b47c-5e39adc02480@www.fastmail.com> Hi Mitch, You might be interested in a tool I made called tessen [1]. It was specifically addressed to deal with both copying and auto-typing of data and having the flexibility to choose either of those actions or both of them simultaneously. This only works on Linux and Wayland though. If you wanna do this inside of a terminal without using any other tool, I've also made pass-tessen [2], which can clip data and can show a preview of the data inside a file (but it doesn't print it). You're also free to fork my script and come up with your own solution. [1]: https://github.com/ayushnix/tessen [2]: https://github.com/ayushnix/pass-tessen Regards, Ayush Agarwal On Sat, Oct 23, 2021, at 1:34 AM, Mitch wrote: > Hi all, > > I frequently find myself looking to use the clip option in addition to > printing other login information (e.g. username). As far as I can tell > from the man page, this seems to be an either/or. I'm sure I could > whip up a hack to do this in one shot, but before I go that route I > wanted to poll the community to see if this is something that there is > already a good solution for (especially an obvious one that I've > overlooked?) > > Thanks for the awesome tool! > > -Mitch From mem at fallback.netnod.se Mon Oct 25 05:59:48 2021 From: mem at fallback.netnod.se (Magnus Sandberg) Date: Mon, 25 Oct 2021 07:59:48 +0200 Subject: Question: Printing and Clipping Password Info In-Reply-To: <1318784.1634977413@apollo2.minshall.org> References: <1318784.1634977413@apollo2.minshall.org> Message-ID: <25de8439-13d3-7f74-4899-7699f4b1af13@fallback.netnod.se> Hi, First; thank Greg for a simple solution! Tip; add '-r' to xclip to remove the trailing newline from the password Version with head/tail instead of awk, whatever you prefer; pass fubar | tee >(tail -n +2 > /dev/tty) \ | head -1 | xclip -i -r -selection clipboard Regards, // mem Den 2021-10-23 kl. 10:23, skrev Greg Minshall: > Mitch, > > i think you could: > ---- > pass fubar | \ > tee >(awk 'NR > 1 {print}' > /dev/tty) | \ > awk 'NR == 1 { print }' | \ > xclip -i -selection clipboard > ---- > (YSMV == your shell may vary). > > cheers, Greg >