diff options
-rwxr-xr-x | dwim | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -42,14 +42,16 @@ for ($phrase) { run @MAILER, $1 } - if (/^(.+?):(\d+).*?$/) { - handle 'file:line (like grep -n)'; + if (/^(.+?):(\d+|\/\S+)/) { + handle 'file:line/query (like grep -n)'; my $p = path $1; - run @EDITOR, "+$2", $p + my $q = $2; + $q =~ s/\)$//; + run @EDITOR, "+$q", $p } - if (/^(.+) line (\d+)\.?$/) { - handle 'FILE line LINE (like perl)'; + if (/^(.+) line (\d+)/) { + handle '<file> line <line> (like perl)'; my $p = path $1; run @EDITOR, "+$2", $p } |