The fn-view function is great to quickly inspect an implementation, but once we want to edit we could save one step by opening the file at the line where the function starts. We could accomplish this by returning

+[line number] [full path to file]

A patch is coming up in the first comment.

Files: 
CommentFileSizeAuthor
#3 devel-format-fn-view-pipe-1421882-3.patch2.07 KBjuampy
FAILED: [[SimpleTest]]: [MySQL] Failed to run tests: failed during invocation of run-tests.sh.
[ View ]
#1 return_line_number_on_fn_show_with_pipe_1421882_1.patch748 bytesjuampy
PASSED: [[SimpleTest]]: [MySQL] 2 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new748 bytes
PASSED: [[SimpleTest]]: [MySQL] 2 pass(es).
[ View ]

Here is a patch. I have tested it with nano, gedit, vi and vim. Applies cleanly on 8.x, 7.x, and 6.x branches.

example:

$ drush fn-view --pipe block_get_blocks_by_region
+313 /home/juampy/projects/drupal/modules/block/block.module
$ vi `drush fn-view --pipe block_get_blocks_by_region`

Status:Needs review» Needs work

Maybe we need a --pattern option where one can specify where the line number should go? For example, Komodo IDE has a different syntax - http://community.activestate.com/faq/komodo-command-line

Title:Return line number on fn-view --pipe so it can be more effectiveAllow the output of fn-view --pipe to be formatted for opening it with an editor
StatusFileSize
new2.07 KB
FAILED: [[SimpleTest]]: [MySQL] Failed to run tests: failed during invocation of run-tests.sh.
[ View ]

Here it is, but used --format instead of --pattern. Let me know if you want me to change it.

Status:Needs work» Needs review

Changing status to needs review.

Status:Needs review» Needs work

The last submitted patch, devel-format-fn-view-pipe-1421882-3.patch, failed testing.

Status:Needs work» Needs review

Output: [Fatal error: Class 'DrupalWebTestCase' not found ...

So it seems that the Testing System is broken ATM.

Status:Needs review» Fixed

Committed to all branches. Thanks.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.