# Shell Completions in Dune Developer Preview

**URL:** <https://discuss.ocaml.org/t/shell-completions-in-dune-developer-preview/15522>\
**Category:** Ecosystem\
**Tags:** dune, announce\
**Created:** [October 29, 2024, 2:55am UTC](https://discuss.ocaml.org/t/shell-completions-in-dune-developer-preview/15522 "2024-10-29T02:55:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gridbugs](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/gridbugs/32/4243_2.png) [@gridbugs](https://discuss.ocaml.org/u/gridbugs)\
**Post date:** [October 29, 2024, 2:55am UTC](https://discuss.ocaml.org/t/shell-completions-in-dune-developer-preview/15522/1 "2024-10-29T02:55:52Z")

</div>

Support for dune shell completions for bash and zsh has just landed in the [Dune Developer Preview](https://preview.dune.build/)!

Running the [installer](https://preview.dune.build/#download) adds a snippet to your shell config (e.g. ~/.bashrc) that installs a completion handler for `dune`. The completion script was taken from [here](https://github.com/gridbugs/dune-completion-scripts), and that page has some information about how the script was generated. Once it’s installed the completions will work any time `dune` is typed at the start of a command, so you can still use the completions when running a version of Dune installed with Opam or your system package manager after installing the Dune Developer Preview.

Currently only command completions are supported. So you can run:

```ignore
$ dune c<TAB>
cache clean coq

```

…or:

```ignore
$ dune build -<TAB>
--action-stderr-on-success
--action-stdout-on-success
--always-show-command-line
--auto-promote
--build-dir
--build-info
--cache
...

```

But if you run `dune build <TAB>` then it will still suggest local files rather than build targets.

## Try it out!

Getting started is easy:

```ignore
$ curl -fsSL https://get.dune.build/install | sh
$ source ~/.bashrc # or: `source ~/.zshrc` or just restart your shell
$ dune <TAB>
build
cache
clean
coq
describe
diagnostics
exec
...

```
