[Bash-completion-devel] [PATCH/RFC] ri: Rename ri_get_methods helper to add leading underscore
Jonathan Nieder
jrnieder at gmail.com
Tue Apr 17 18:52:02 UTC 2012
Completions generally name the identifiers they export with a leading
'_' to avoid clashing with user functions. The only exception is this
helper function in the "ri" completion script; fix it.
Reported-by: Felipe Contreras <felipe.contreras at gmail.com>
---
Thanks for keeping the bash completion script collection well
maintained. Here's a small patch to address a nitpick. What do you
think?
Thanks,
Jonathan
completions/ri | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/completions/ri b/completions/ri
index 43f6408a..62a9b709 100644
--- a/completions/ri
+++ b/completions/ri
@@ -1,7 +1,7 @@
# ri completion for Ruby documentation -*- shell-script -*-
# by Ian Macdonald <ian at caliban.org>
-ri_get_methods()
+_ri_get_methods()
{
local regex
@@ -56,7 +56,7 @@ _ri()
method=${cur#*$separator}
classes=( $class )
prefix="-P $class$separator"
- ri_get_methods
+ _ri_get_methods
return 0
fi
@@ -82,7 +82,7 @@ _ri()
# we're completing on methods
method=$cur
- ri_get_methods
+ _ri_get_methods
} &&
complete -F _ri ri
--
1.7.10
More information about the Bash-completion-devel
mailing list