aboutsummaryrefslogtreecommitdiff
path: root/content/posts/2006-09-15-ri-bash-completion.html
blob: 7b771878a0bf253ab615e6293ab57aa28c1e4d96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
---
date: "2006-09-15T17:33:53Z"
title: RI Bash Completion
---

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

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