Sha256: 63c4c9aff05c4a02b12d83580f3aa2eeb3d764b522dd5e90990bf2a2daf25531

Contents?: true

Size: 764 Bytes

Versions: 2

Compression:

Stored size: 764 Bytes

Contents

# any object's methods
complete :object=>"Object"
# method arguments
complete :all_methods=>true
complete :all_operator_methods=>true
# classes and constants
complete(:name=>:constants, :anywhere=>'([A-Z][^. \(]*)::([^: .]*)') {|e|
  receiver = e.matched[2]
  candidates = eval("#{receiver}.constants | #{receiver}.methods") || []
  normal_search(e.matched[3], candidates).map {|e| receiver + "::" + e}
}
# absolute constants
complete(:prefix=>'::', :anywhere=>'[A-Z][^:\.\(]*') {|e| Object.constants }
complete(:anywhere=>':[^:\s.]*') {|e|  Symbol.all_symbols.map {|f| ":#{f}" } rescue [] }
complete(:anywhere=>'\$[^\s.]*') {|e| global_variables }
complete(:name=>:quoted_files, :on=>/[\s(]["']([^'"]*)$/, :search=>false, :place=>:last) {|e| files(e.matched[1]) }

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bond-0.2.2 lib/bond/completion.rb
bond-0.2.1 lib/bond/completion.rb