From 5fcd5366edb8f874e565f15ed46681f2e88ce01e Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Sat, 2 Nov 2019 23:24:25 -0400 Subject: [PATCH] added rule for man pages --- src/fetch.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fetch.c b/src/fetch.c index bfa4492..eb8ef02 100644 --- a/src/fetch.c +++ b/src/fetch.c @@ -59,6 +59,13 @@ static Rule*** BuiltinRules = (Rule**[]){ // &(Rule){ LAUNCH, "find Code -type f -name \"*$data\" | xargs -r edit", NULL }, // &(Rule){ COMPLETE, NULL, NULL } // }, + + (Rule*[]){ /* Open man pages in a tide window */ + &(Rule){ ISSET, "BROWSER", NULL }, + &(Rule){ MATCHES, "data", "(.+)\\(([0-9]+)\\)" }, + &(Rule){ LAUNCH, "man -Pcat $M2 \"$M1\" | tide -", NULL }, + &(Rule){ COMPLETE, NULL, NULL } + }, (Rule*[]){ /* If it's an existing directory, open it with system default */ &(Rule){ ISDIR, "$data", NULL }, &(Rule){ LAUNCH, "cd $data && ls -ap | tide -", NULL }, -- 2.49.0