diff options
author | John <john@ankarstrom.se> | 2019-06-08 00:41:37 +0200 |
---|---|---|
committer | John <john@ankarstrom.se> | 2019-06-08 00:46:01 +0200 |
commit | 2d9446bbe431fb173e812472f438e0751fbb87b1 (patch) | |
tree | 77e49390393400f76bf1c6a2ed7da6d4570a0050 | |
parent | 4572e5875ff4a2385199994abaad0d3a30727541 (diff) | |
download | dwim-2d9446bbe431fb173e812472f438e0751fbb87b1.tar.gz |
change names of handlers
-rwxr-xr-x | dwim | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -33,19 +33,19 @@ for ($phrase) { } if (/^(.+):(\d+).*?$/) { - handle "{file}:{line} (like grep -n)"; + handle "file:line (like grep -n)"; my $p = path $1; run @LAUNCHER, @EDITOR, "-c", ":$2", "$p" } if (/^(.+) line (\d+)\.?$/) { - handle "{file} line {line} (like perl)"; + handle "FILE line LINE (like perl)"; my $p = path $1; run @LAUNCHER, @EDITOR, "-c", ":$2", "$p" } if (/^(.+):(.+)$/) { - handle "{file}:{query} (like grep)"; + handle "file:query (like grep)"; my $p = path $1; run @LAUNCHER, @EDITOR, "-c", "/$2", "$p" if -e $p; fail "file not found" if $o{d}; @@ -53,12 +53,12 @@ for ($phrase) { } if (/^([^\s]+)\(([^\s]+)\)[,.]?/) { - handle "{manpage}({section})"; + handle "manpage(section)"; run @LAUNCHER, "man", "$2", "$1"; } if (/^<([^\s]+)>$/) { - handle "header file"; + handle "<header.h>"; 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"; |