# Bash completions for Julia

**URL:** https://discourse.julialang.org/t/bash-completions-for-julia/70795
**Category:** Tooling
**Created:** [November 2, 2021, 10:35am UTC](https://discourse.julialang.org/t/bash-completions-for-julia/70795 "2021-11-02T10:35:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [November 2, 2021, 10:35am UTC](https://discourse.julialang.org/t/bash-completions-for-julia/70795/1 "2021-11-02T10:35:43Z")

</div>

I bundled up my local Bash completions for Julia in a repository since I think it might be useful for others: [fredrikekre/julia-completions](https://github.com/fredrikekre/julia-completions). The completions are fairly “smart” and, for example, only complete `*.toml` files after the `--project` flag, and only `yes`/`no` after `--startup-file` etc.

Installation is very easy (see the [README](https://github.com/fredrikekre/julia-completions#installation)):

1. Download the script:

```julia
mkdir -p ~/.bash_completion.d
curl -fsSL -o ~/.bash_completion.d/julia-completion.bash \
     https://raw.githubusercontent.com/fredrikekre/julia-completions/master/julia-completion.bash

```

2. Hook into the shell:

```julia
echo '# Bash completion for julia, see https://github.com/fredrikekre/julia-completions
if [[-f ~/.bash_completion.d/julia-completion.bash]]; then
    . ~/.bash_completion.d/julia-completion.bash
fi' >> ~/.bashrc

```

This will add completions for the `julia` command. If you want to add completions also for other commands/aliases, e.g. `julia-master`, you can simply add

```julia
complete -F _julia julia-master

```

to `~/.bashrc` after sourcing the script above.

I hope some of you find it useful!
