Skip to content

Commit

Permalink
Add setting for compinit arguments
Browse files Browse the repository at this point in the history
Resolves #518.
  • Loading branch information
marlonrichert committed May 2, 2023
1 parent 9bfb8c7 commit f79acc7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,13 @@ Try the steps in the
The following are the most commonly requested ways to configure Autocomplete's
behavior. Add these to your `.zshrc` file to use them.

### Pass arguments to `compinit`

If necessary, you can let Autocomplete pass arguments to `compinit` as follows:
```sh
zstyle '*:compinit' arguments -D -i -u -C -w
```

### Reassign <kbd>Tab</kbd>
You can reassign <kbd>Tab</kbd> to do something else than the default. This
includes letting another plugin set it. Here are two examples of what you can
Expand Down
4 changes: 3 additions & 1 deletion scripts/.autocomplete.compinit
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ compdef() {
bindkey() { : }
{
builtin autoload +X -Uz compinit
compinit -d $_comp_dumpfile
local -a compargs=()
zstyle -a ':autocomplete::compinit' arguments compargs
compinit -d "$_comp_dumpfile" "$compargs[@]"
} always {
unfunction bindkey
}
Expand Down

0 comments on commit f79acc7

Please sign in to comment.