I hope, that I have not reinvented the wheel once again, but I just found
a neat way to make ri behave better. I use a short script to make bash
complete class, method and module names when pressing tab.
$ ri Array#f<TAB>
I thought there might be some people interested in this. If it is already
common knowledge, I apologize for polluting this newsgroup.
Here is the neccesary code:
___/etc/bash_completition.d/ri___
# Debian GNU/Linux ri completion
On Tue, 24 Aug 2004 09:40:43 +0900, Brian Schroeder <spam0504@bssoftware.de> wrote:
I hope, that I have not reinvented the wheel once again, but I just found
a neat way to make ri behave better. I use a short script to make bash
complete class, method and module names when pressing tab.
$ ri Array#f<TAB>
I thought there might be some people interested in this. If it is already
common knowledge, I apologize for polluting this newsgroup.
Here is the neccesary code:
___/etc/bash_completition.d/ri___
# Debian GNU/Linux ri completion
# Copyright 2004 Brian Schröder <mail@brian-schroeder.de>
# License: GNU GPL v2 or later
have ri &&
_ri()
{
local cur conns
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $(ri -l | grep "^${cur}") )
fi
return 0
}
[ "$have" ] && complete -F _ri ri
## based on:
## Debian GNU/Linux pon/poff(1) completion
## Copyright 2002 Baruch Even <baruch@debian.org>
## License: GNU GPL v2 or later
___EOF___