diff options
author | John <john@ankarstrom.se> | 2019-06-08 00:38:31 +0200 |
---|---|---|
committer | John <john@ankarstrom.se> | 2019-06-08 00:44:37 +0200 |
commit | 4572e5875ff4a2385199994abaad0d3a30727541 (patch) | |
tree | 338be2fa358fb0561561af377b9e9583541c33b4 | |
parent | c53a3eed701ed7b347a40b4ac6bd45660fc19d6e (diff) | |
download | dwim-4572e5875ff4a2385199994abaad0d3a30727541.tar.gz |
add handler for <header.h> notation
-rwxr-xr-x | dwim | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -57,6 +57,13 @@ for ($phrase) { run @LAUNCHER, "man", "$2", "$1"; } + if (/^<([^\s]+)>$/) { + handle "header file"; + run @LAUNCHER, @EDITOR, "/usr/include/$1" if -e "/usr/include/$1"; + run @LAUNCHER, @EDITOR, "/usr/local/include/$1" if -e "/usr/local/include/$1"; + fail "header file not found"; + } + if (/^([^\s]+)$/) { handle "maildir / directory / file"; my $p = path $1; |