Skip to content

Commit

Permalink
ri: Rename ri_get_methods helper to add leading underscore
Browse files Browse the repository at this point in the history
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@gmail.com>
  • Loading branch information
jrn authored and GArik committed Apr 18, 2012
1 parent 587d268 commit 8b3f19a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions completions/ri
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ri completion for Ruby documentation -*- shell-script -*-
# by Ian Macdonald <ian@caliban.org>

ri_get_methods()
_ri_get_methods()
{
local regex

Expand Down Expand Up @@ -56,7 +56,7 @@ _ri()
method=${cur#*$separator}
classes=( $class )
prefix="-P $class$separator"
ri_get_methods
_ri_get_methods
return 0
fi

Expand All @@ -82,7 +82,7 @@ _ri()

# we're completing on methods
method=$cur
ri_get_methods
_ri_get_methods
} &&
complete -F _ri ri

Expand Down

0 comments on commit 8b3f19a

Please sign in to comment.