RI Bash Completion

September 15, 2006

If you use ri in bash, add this little snippet to your .bashrc to enable tab-completion:

function _ri() { COMPREPLY=($(ri --list | grep "^${COMP_WORDS[COMP_CWORD]}")); }
complete -F _ri ri