From 2e301cac7343e11720d47873827f45aa517ccce0 Mon Sep 17 00:00:00 2001 From: Kyle Bowman Date: Thu, 10 Apr 2025 08:03:40 -0400 Subject: [PATCH] move todo from belfry into golem --- todo.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/todo.md b/todo.md index e69de29..77217fe 100644 --- a/todo.md +++ b/todo.md @@ -0,0 +1,30 @@ +# To Do + +* add_ssh - use ssh-keygen and scp + +## Import Module + +There's no need to import a library before it's needed. But many libraries can +be imported for the first time from many places. It would be nice to have a +standardized way to check if a module has been imported. + +Some thoughts: + +* On import, add the module's name to a global variable +* On check, see if module's name is in global variable +* On teardown, unset the global variable + +Or, I could just check `declare -F` for the function I want. + +Or, I could source without a check. A function-only library should be idempotent. + +## Improve Logs with Stderr Capture + +You can capture stderr, stdout like this: + +``` bash +echo "test output" > .test \ + && { TEST="$(<.test)"; echo "$TEST"; rm .test; } +do_whatever "$TEST" +unset TEST +``symlink` \ No newline at end of file -- 2.39.5