From burnedfaceless at gmail.com Wed Jun 15 16:57:04 2022 From: burnedfaceless at gmail.com (Brian Abbott) Date: Wed, 15 Jun 2022 12:57:04 -0400 Subject: Pass Bash AutoCompletion for Mac When Installed With Homebrew Message-ID: I recently got Bash autocompletion working for Pass on Mac. I am running an M1 Macbook Pro that is running macOS Monterey 12.3.1. I installed pass with homebrew. Out of the box on Macs pass does not have bash autocomplete at least when installed with homebrew. The first thing I did was set Bash as the default shell. This still did not work. So what I did was download this file https://github.com/zx2c4/password-store/blob/master/src/completion/pass.bash-completion. If you run source pass.bash-completion you will have auto completion working. However there is an error message. Here's an example: I have a pass entry for fiverr.com so I typed fiver, hit tab and this is the output pass -c fiver-bash: compopt: command not found r.com So as you can see the autocorrect is working after running source pass.bash-completion but there is the compopt: command not found error. The next thing I did was put source ~/pass.bash-completion in ~/.bash_profile, so that the script would run. Obviously I placed the pass.bash-completion file in my home directory. I should note that it's not the file from my version of pass and maybe it should be. To get rid of the compopt error message I simply had to install bash with homebrew: brew install bash Then if you are on an Intel Mac you will add /usr/local/bin/bash to /etc/shells If you are on a M1 Mac you will add /opt/homebrew/bin/bash to /etc/shells Next you will run chsh -s /usr/local/bin/bash or chsh -s /opt/homebrew/bin/bash depending on whether you are using a M1 Mac or an Intel Mac. Once this is done your Mac will support bash autocompletion with Homebrew. :) I want to add a disclaimer that some of these steps might not be necessary. Almost everyone on this mailing list, if not everyone is more technical than me. I wanted to shoot this message out so that a step by step instruction to set up bash autocomplete for pass on Mac when installed with Homebrew will show up on Google. It's taken me a few months to figure out how to do this. :) Obviously in this email chain there might be improvements to these instructions by more technical people which will be good for whoever comes across this in the future. :) Thank you very much to the creator, maintainers and developers of this script. :) I'm a Schizophrenic junior level software developer. I lost my 20s to Schizophrenia and I am just on the edge of my seat at work and in personal projects :). Life is great. :) My 30s will be spent hacking away. :) Brian From helmo at initfour.nl Tue Jun 28 12:39:11 2022 From: helmo at initfour.nl (Herman van Rink) Date: Tue, 28 Jun 2022 14:39:11 +0200 Subject: [PATCH] Add a log subcommand Message-ID: <98ef391d-82ea-b7f7-c47f-9fb86f644e94@initfour.nl> Hi, I frequently use the Git history in a passwordstore. But the current syntax is a bit cumbersome ... `pass git log pass/entry/foo.gpg` With this patch we reduce that to `pass log pass/entry/foo` Especially the trailing '.gpg' annoyed me. The bash completion seems to work, I've not tested the zsh and fish completion. This code is also on https://github.com/helmo/password-store/tree/pass-log --- ?src/password-store.sh | 3 +++ ?src/completion/pass.bash-completion | 4 ++++ ?src/completion/pass.fish-completion | 1 + ?src/completion/pass.zsh-completion? | 4 ++++ ? 4 files changed, 12 insertions(+) diff --git a/src/password-store.sh b/src/password-store.sh index 22e818f..bc5dc07 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -306,6 +306,8 @@ cmd_usage() { ???? ??????? Renames or moves old-path to new-path, optionally forcefully, selectively reencrypting. ???? ??? $PROGRAM cp [--force,-f] old-path new-path ???? ??????? Copies old-path to new-path, optionally forcefully, selectively reencrypting. +??? ??? $PROGRAM log pass-name +??? ??????? Show the Git history for pass-name. ???? ??? $PROGRAM git git-command-args... ???? ??????? If the password store is a git repository, execute a git command ???? ??????? specified by git-command-args. @@ -715,6 +717,7 @@ case "$1" in ???? delete|rm|remove) shift;??? cmd_delete "$@" ;; ???? rename|mv) shift;??? ??? cmd_copy_move "move" "$@" ;; ???? copy|cp) shift;??? ??? ??? cmd_copy_move "copy" "$@" ;; +??? log) shift;??? ??? ??? cmd_git log "$@.gpg" ;; ???? git) shift;??? ??? ??? cmd_git "$@" ;; ???? *)??? ??? ??? ??? cmd_extension_or_show "$@" ;; ?esac diff --git a/src/completion/pass.bash-completion b/src/completion/pass.bash-completion index 2d23cbf..2931db0 100644 --- a/src/completion/pass.bash-completion +++ b/src/completion/pass.bash-completion @@ -120,6 +120,10 @@ _pass() ???? ??? ??? ??? COMPREPLY+=($(compgen -W "-r --recursive -f --force" -- ${cur})) ???? ??? ??? ??? _pass_complete_entries ???? ??? ??? ??? ;; +??? ??? ??? log|-*) +??? ??? ??? ??? COMPREPLY+=($(compgen -W "" -- ${cur})) +??? ??? ??? ??? _pass_complete_entries 1 +??? ??? ??? ??? ;; ???? ??? ??? git) ???? ??? ??? ??? COMPREPLY+=($(compgen -W "init push pull config log reflog rebase" -- ${cur})) ???? ??? ??? ??? ;; diff --git a/src/completion/pass.fish-completion b/src/completion/pass.fish-completion index 0f57dd2..7745cd8 100644 --- a/src/completion/pass.fish-completion +++ b/src/completion/pass.fish-completion @@ -104,6 +104,7 @@ complete -c $PROG -f -n '__fish_pass_needs_command' -a "(__fish_pass_print_entri ?complete -c $PROG -f -n '__fish_pass_uses_command -c' -a "(__fish_pass_print_entries)" ?complete -c $PROG -f -n '__fish_pass_uses_command --clip' -a "(__fish_pass_print_entries)" +complete -c $PROG -f -n '__fish_pass_needs_command' -a log -d 'Command: Show the Git history for pass-name.' ?complete -c $PROG -f -n '__fish_pass_needs_command' -a git -d 'Command: execute a git command' ?complete -c $PROG -f -n '__fish_pass_uses_command git' -a '(__fish_pass_git_complete)' ?complete -c $PROG -f -n '__fish_pass_needs_command' -a find -d 'Command: find a password file or directory matching pattern' diff --git a/src/completion/pass.zsh-completion b/src/completion/pass.zsh-completion index d911e12..77b2b35 100644 --- a/src/completion/pass.zsh-completion +++ b/src/completion/pass.zsh-completion @@ -72,6 +72,9 @@ _pass () { ???? ??? ??? ??? ??? "--recursive[recursively delete]" ???? ??? ??? ??? ??? _pass_complete_entries_with_subdirs ???? ??? ??? ??? ;; +??? ??? ??? log) +??? ??? ??? ??? ??? _pass_complete_entries_with_subdirs +??? ??? ??? ??? ;; ???? ??? ??? git) ???? ??? ??? ??? local -a subcommands ???? ??? ??? ??? subcommands=( @@ -102,6 +105,7 @@ _pass () { ???? ??? ??? "mv:Rename the password" ???? ??? ??? "cp:Copy the password" ???? ??? ??? "rm:Remove the password" +??? ??? ??? "log:Show the Git history for pass-name." ???? ??? ??? "git:Call git on the password store" ???? ??? ??? "version:Output version information" ???? ??? ??? "help:Output help message" -- 2.30.2 -- Met vriendelijke groet / Regards, Herman van Rink Initfour websolutions From nick at kousu.ca Thu Jun 30 18:41:13 2022 From: nick at kousu.ca (Nick) Date: Thu, 30 Jun 2022 18:41:13 +0000 Subject: Website: Browserpass link is out of date Message-ID: On https://www.passwordstore.org the link to browserpass is https://github.com/dannyvankooten/browserpass#readme an archived repo. This makes it hard for me to sell my teammates on pass when the competition looks like 1-click installs of 1password or LastPass which works the same on both Firefox and Chrome. The ones that I walk through it though have a very good experience, it's just I encounter resistance getting them to that point because of the confusion they run into when they look on https://www.passwordstore.org and search for "Chrome" and find what looks like a dead end. I think this link could be replaced with https://github.com/browserpass/browserpass-extension#installation, which is the current working version. Is this the right place to ask about website edits? Is there a git repo for the website that I could checkout and create a patch for? Thanks -kousu