We can store the generated script in a file to be sourced upon launching the terminal, or we can evaluate it with the command:
eval "$(my-script help print-completions-script)"
For a script named my-script
, it is a good idea to install a file with pathname:
/etc/bash_completions.d/my-script.bash
with contents:
# my-script.bash -- # # Completions for the "my-script" script. eval "$(my-script help print-completions-script)" ### end of file
This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.