Is there a mechanism for getting a function definition from console without grepping manually files ?
I search for a way to find fast a definition of known function name.
For example I want to know where "_kill" autocompletion function is defined.
In ruby with the use of pry I can get something like this:
show-method find
From: app/models/search/object.rb @ line 2:
Number of lines: 7
def self.find(conditions = {}, options = {})
type = extract_object_type
raise 'do not call Search::Object directly' if type == 'Object'
search_logic = "Search::#{type.camelize}Logic".constantize.new(conditions, options)
search_logic.process!
search_logic.execute
end
For zsh, try
whence -fortype -f. For example: