commit 29590d0cd9f1f3796a52f1a220221c50303ff960
parent 15040bc2dd25cef0e7df30a929b77fa2b633a932
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date: Fri, 3 Sep 2021 00:47:50 -0700
Use rc's whatis builtin to print function definitions in fns
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/local/rc/lib/profile b/local/rc/lib/profile
@@ -65,7 +65,7 @@ fn pt { pkgtree $* }
# simple
fn curl { builtin curl -SsL $* }
fn dsu { doas su $* }
-fn fns { printenv | grep '^fn#' | cut -d '#' -f2- }
+fn fns { whatis `{ printenv | awk -F '[#=]' '/^fn#/ { print $2 }' } }
fn ls { 9 ls $* }
# short