diff options
author | John Ankarström <john@ankarstrom.se> | 2021-06-15 08:09:44 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-06-15 08:09:44 +0200 |
commit | 0590c64260739c0736967b69654f89bee98ed5df (patch) | |
tree | ef79c5108b1829d8b0a83d00a4793e79804194cb | |
parent | fc37fb24c08602e112bcce8322d2a63cad7184fe (diff) | |
download | dwim-0590c64260739c0736967b69654f89bee98ed5df.tar.gz |
Handle diff -u headers
-rwxr-xr-x | dwim | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; |