Autocomplete see history edit this page

Talks about: <a class="post-tag post-tag-autocomplete" href="/tags/autocomplete">autocomplete</a>

The ilo generate-completion command generates autocompletion configuration for shells such as bash and zsh.

Once enabled you can use the <TAB> key to autocomplete ilo commands and their options:

# autocomplete commands
$ ilo s<TAB>
$ ilo shell

# autocomplete options
$ ilo shell --re<TAB>
$ ilo shell --remove-image

bash

In order to integrate autocompletion into bash, follow these steps:

  1. Create or edit ~/.bashrc.
  2. Add the following line
    source <(ilo generate-completion)
    
  3. Reload your shell (or create a new one)

zsh

In order to integrate autocompletion into zsh, follow these steps:

  1. Create or edit $ZDOTDIR/.zshrc.
  2. Add the following line
    source <(ilo generate-completion)
    
  3. Reload your shell (or create a new one)