lib/tty/reader/completer.rb
def complete(line, direction: :next, initial: false)
        if initial
          complete_initial(line, direction: direction)
        else
          complete_next(line, direction: direction)
        end
      end
# Find a suggestion to complete a word
#
# @param [Line] line
#   the line to complete a word in
# @param [Symbol] direction
#   the direction in which to cycle through completions
# @param [Boolean] initial
#   whether to find initial or next completion suggestion
#
# @return [String, nil]
#   the completed word or nil when no suggestion is found
#
# @api public
Find a suggestion to complete a word
Find a suggestion to complete a word
def complete(line, direction: :next, initial: false)
        if initial
          complete_initial(line, direction: direction)
        else
          complete_next(line, direction: direction)
        end
      end
def complete ( line , direction : :next , initial : false ) if initial complete_initial ( line , direction : direction ) else complete_next ( line , direction : direction ) end end
Find a suggestion to complete a word
Find a suggestion to complete a word
the completed word or nil when no suggestion is found
the completed word or nil when no suggestion is found
String, nil
line
direction
initial
initial whether to find initial or next completion suggestion
initial whether to find initial or next completion suggestion
api
None