fn-view

Show the source of specified function or method.

drush fn-view

Aliases:

Arguments:

function : The name of the function or method to view.

Options:

--pipe : Output just the filename of the function or method
--format : Specify how the filename should be printed. Available placeholders are @startline, @endline and @file

Examples:

View the source code for function "drupal_set_breadcrumb"

fn-view drupal_set_breadcrumb

Edit the file that contains the function "user_access"

vi `drush --pipe fn-view user_access --format='+@startline @file'`

View the source code for method load in the class NodeController

fn-view NodeController::load