Errors and failures show in different formats when running tests (not a very *intelligent* thing if you ask me, but...). Well, a simple regex and we have 'pe' , powered-emacslient, path-edit, or whatever. In my shell, double click any of the two versions and 'pe
.. app/models/bar.rb:88:in ..
.. [test/unit/foo_test.rb:9]: ..
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#---e----- | |
#!/bin/zsh | |
emacsclient -n "$@" | |
#---pe---- | |
#!/usr/bin/perl | |
my ($file, $line) = shift =~ m/\/?(.*):(\d+):?/; | |
system 'emacsclient', '-n', "+$line", $file ; |
'e' is the original emacsclient script I use for other files. Unifying both scripts in one is left as exercise to the reader.
I want to spend an afternoon hacking a urxvt plugin to fetch for strings ressembling paths, and be able to open them using just keyboard, but that's a thing for another day.
No hay comentarios:
Publicar un comentario