1
0

Changed to fully Functional Scripting for most scripts

This commit is contained in:
2025-07-30 17:21:40 +02:00
parent 80a119972f
commit e6b082f38c
3 changed files with 11 additions and 16 deletions

View File

@@ -1,14 +1,14 @@
export def lumen-search-content [searchstr: string]: any -> table {
let $tmp = $in
mut $path = pwd
if ($tmp != null) {
$path = $tmp
}
cd $path
let $tmp = (if ($in != null) {
$in
} else {
pwd
})
cd $tmp
ls -a **/* | par-each {|i|
{file: $i.name,
content: (if (($i | get type) == file ) {
try {open $i.name --raw | find $searchstr} catch {|err| {}}
try {open $i.name --raw | find $searchstr} catch {{}}
})
}
} | compact content -e