aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdwim7
1 files changed, 7 insertions, 0 deletions
diff --git a/dwim b/dwim
index 49fd9f5..91ce5b8 100755
--- a/dwim
+++ b/dwim
@@ -98,6 +98,13 @@ for ($phrase) {
fail 'header file not found';
}
+ if (/(?:\+\+\+|---) (\S+) .*?$@@ -(\d+)/ms) {
+ handle 'diff header';
+ my ($p, $l) = ($1, $2);
+ $p = path($p)."/$p" if not $p =~ m{^/};
+ run @EDITOR, "+$l", $p;
+ }
+
if (/^(\S+)$/) {
handle 'maildir / directory / file';
my $p = path $1;