Skip to content

Commit

Permalink
Updated bash autocompletion setup commands (#2696)
Browse files Browse the repository at this point in the history
Signed-off-by: Marc <fetwar@fetwar.com>
  • Loading branch information
fetwar authored Nov 18, 2023
1 parent e913258 commit 55ea5cf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,18 @@ Before migrating to gopass, you may have been using other password managers (suc

### Enable Bash Auto completion

If you use Bash, you can run one of the following commands to enable auto completion for sub-commands like `gopass show`, `gopass ls` and others.
If you use Bash, you can use the following command to enable auto completion for all users for sub-commands like `gopass show`, `gopass ls` and others.

```bash
source <(gopass completion bash)
gopass completion bash | sudo tee $(pkg-config --variable=completionsdir bash-completion)
```

To enable bash completions for the current user only:
```bash
grep -q "source <(gopass completion bash)" ~/.bashrc || echo "source <(gopass completion bash)" >> ~/.bashrc
```


**MacOS**: The version of bash shipped with MacOS may [require a workaround](https://stackoverflow.com/questions/32596123/why-source-command-doesnt-work-with-process-substitution-in-bash-3-2) to enable auto completion. If the instructions above do not work try the following one:

```bash
Expand Down

0 comments on commit 55ea5cf

Please sign in to comment.