From f2cb448b37e7d62d19d943c3156ad32d491c0121 Mon Sep 17 00:00:00 2001 From: Luminiferous Date: Tue, 3 Jun 2025 16:00:46 +0200 Subject: [PATCH] Added config.nu --- .gitignore | 2 ++ config.nu | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .gitignore create mode 100644 config.nu diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eefb42b --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +env.nu +history.txt diff --git a/config.nu b/config.nu new file mode 100644 index 0000000..f731d72 --- /dev/null +++ b/config.nu @@ -0,0 +1,30 @@ +# config.nu +# +# Installed by: +# version = "0.104.1" +# +# This file is used to override default Nushell settings, define +# (or import) custom commands, or run any other startup tasks. +# See https://www.nushell.sh/book/configuration.html +# +# This file is loaded after env.nu and before login.nu +# +# You can open this file in your default editor using: +# config nu +# +# See `help config nu` for more options +# +# You can remove these comments if you want or leave +# them for future reference. + +$env.config.show_banner = false + +export def lumen-search-content [searchstr = string]: any -> table { + ls -a **/* | par-each {|i| + {file: $i.name, + content: (if (($i | get type) == file ) { + try {open $i.name --raw | find $searchstr} catch {|err| {}} + }) + } + } | compact content -e +}