I have never used bash completion of todo.txt cli; however, I have decided to give it try. On the author's github, it says:
(Optional, since v 2.9:) Install the Bash completion, either system-wide, for all users:
$ sudo cp todo_completion /etc/bash_completion.d/todo
or
put it somewhere in your home directory and source it from your .bashrc:
Now in the install documentation for bash completion, it says:
The easiest way to install this software is to use a package; it is available
in many operating system distributions. The package's name is usually
bash-completion. Depending on the package, you may still need to source it
from either /etc/bashrc or ~/.bashrc (or any other file sourcing those). You
can do this by simply using:
# Use bash-completion, if available
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
. /usr/share/bash-completion/bash_completion
So from my understanding, which may wrong, I should put
# Use bash-completion, if available
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
. /usr/share/bash-completion/bash_completion
in my ~/.bashrc. Now should I put todo-completion in /usr/share/bash-completion/bash-completion? If so, I only have /usr/share/bash-completion but there is a completion one level below bash-completion.
To be honest, I could be all wrong with this thought process. I have been doing numerous searches on todo and bash-completion but nothing has been too promising. So if this is all incorrect, how do I set up both up together?