refactor!: initialization through templates

This commit is contained in:
iff 2025-04-05 18:31:45 +02:00
parent 4f637c1e1b
commit 885dc081e1
9 changed files with 230 additions and 211 deletions

4
core/templates/init.nu Normal file
View file

@ -0,0 +1,4 @@
def --env {{ alias }} [] {
let dir = (with-env { _PR_LAST_COMMAND: (history | last).command, _PR_ALIAS: (help aliases | select name expansion | each ({ |row| $row.name + "=" + $row.expansion }) | str join (char nl)), _PR_SHELL: nu } { {{ binary_path }} })
cd $dir
}