Basic alire autocompletion script

I said basic!

#/usr/bin/env bash
_alire_completions()
{
  COMPREPLY=($(compgen -W "\
        help cache settings config instsall toolchain version \
        get index search show \
        build clean edit exec init pin printenv run update with \
        action dev test \
        publish \
        " "${COMP_WORDS[1]}"))
}

complete -F _alire_completions alr

~/.bashrc:

source ~/.bash_alire_completionsrc
4 Likes

I slapped it on github.

? simple typo, eh? Other than that, AWESOME!

1 Like

There’s also a more elaborate autocompletion script in the Alire repository. See:

Not publicised. Good, I’ll use that then.