Repository navigation
Closed
Description
macOS version: 15.7.7 (24G720)
gopass version: 1.16.1-git+d601d3ef go1.26.3 darwin amd64
bash version: GNU bash, version 5.3.9(1)-release (x86_64-apple-darwin23.6.0)
I was so excited about the fix for #3435 that I decided to try out the new build right away. I've installed it in the following way:
go install github.com/gopasspw/gopass@2891435694d6428c5e91625bdd303db2b52e63ec- made sure that gopass binary is on
$PATH:
~$ type -a gopass
gopass is /Users/wheleph/go/bin/gopass- tried to setup bash completion for gopass:
~$ gopass --version
gopass 1.16.1-git+d601d3ef go1.26.3 darwin amd64
~$ gopass completion bash > gopass-completion.bash
~$ cat gopass-completion.bash
_gopass_bash_autocomplete() {
local cur opts base
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
# Use error handling to prevent crashes from invalid flags
opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion 2>/dev/null ) || opts=""
local IFS=$'\n'
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
}
complete -F _gopass_bash_autocomplete gopass
~$ source gopass-completion.bash
~$ gopass sho<tab>- if I hit Tab key after typing
gopass shoin Bash prompt then nothing happens, the expected subcommandshowis not autocompleted
To debug the issue I removed stderr redirection in the following way and observed the error:
~$ cat gopass-completion.bash
_gopass_bash_autocomplete() {
local cur opts base
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
# Use error handling to prevent crashes from invalid flags
opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion ) || opts=""
local IFS=$'\n'
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
}
complete -F _gopass_bash_autocomplete gopass
~$ source gopass-completion.bash
~$ gopass sho
Error: Incorrect Usage: flag provided but not defined: -generate-bash-completion
2026/05/24 21:18:33 flag provided but not defined: -generate-bash-completionIs it an issue in the gopass binary or did I install it incorrectly (which is totally possible since I'm a complete Golang noob).
Metadata
Metadata
Assignees
Labels
No labels
Activity
dominikschulz commentedon May 24, 2026
Thanks for the report. This might be a setup issue. If your bash completion still points at the old binary is might be confsued.
But it could very well be a bug as well. We just switched to a new major version of the CLI lib and that changes the way bash completion works a bit.
I will try to reproduce and see if this is a bug that we need to fix.
dominikschulz commentedon May 24, 2026
Looks like a real bug. Thanks for reporting!
We might need to little while to publish the next stable version, but I'll try to cut a new RC tomorrow.
fix: update bash completion flag for urfave/cli/v3 compatibility (#3441)