Skip to content

Commit

Permalink
Update README.md about tab completion
Browse files Browse the repository at this point in the history
Signed-off-by: Adrien Gallouët <[email protected]>
  • Loading branch information
angt committed May 8, 2020
1 parent b299d44 commit 4c826db
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,28 @@ Then, run as `root`:

As usual, you can customize the destination with `DESTDIR` and `prefix`.

If you want the tab completion in `bash`, you have to do it manually for now.
Luckily, it's super easy! Just download the file [argz.bash](argz/comp/argz.bash) and then:
### Tab completion

$ . argz.bash
$ complete -F _argz secret
Tab completion works with `bash` and `yash` (`zsh` is also supported if you enable `bashcompinit`).
Unfortunately, it doesn't work out of the box, you have to setup it manually.
Luckily, it's super easy!

It's exactly the same for `zsh` if you have enabled `bashcompinit'.
Download the file corresponding to your shell:
- [argz.bash](https://github.com/angt/argz/blob/dev/comp/argz.bash).
- [argz.yash](https://github.com/angt/argz/blob/dev/comp/argz.yash).

Then you can add these lines in your `.bashrc` (or `.zshrc`):

. argz.bash
complete -F _argz secret

Or in your `.yashrc`:

. argz.yash

function completion/secret {
command -f completion//reexecute argz
}

Completion for secrets is only available in a trusted shell. See below.

Expand Down

0 comments on commit 4c826db

Please sign in to comment.