From 3e67d789e05cbde336981e50bacd0e09b0225332 Mon Sep 17 00:00:00 2001 From: shockrah Date: Mon, 27 Jul 2020 20:32:32 -0700 Subject: [PATCH] ref command for accessing useful reference guides --- ref | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 ref diff --git a/ref b/ref new file mode 100755 index 0000000..b0e78f6 --- /dev/null +++ b/ref @@ -0,0 +1,13 @@ +#!/bin/sh + +loc="$HOME"/.config/ref/pages +mkdir -p $loc + +# open through dmenu if there's no args +if [ -z $1 ];then + page=`find $loc -type f | dmenu -i -l 20` + less "$page" +else + less $loc/"$1" +fi +