From 4572e5875ff4a2385199994abaad0d3a30727541 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 8 Jun 2019 00:38:31 +0200 Subject: add handler for notation --- dwim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dwim b/dwim index b646de6..f93fa0c 100755 --- a/dwim +++ b/dwim @@ -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; -- cgit v1.2.3