Add hook that loads a project.nu if it exists

main
Julius Riegel 7 months ago
parent 742d2d4850
commit 2a54d3e5af

@ -194,7 +194,13 @@ $env.config = {
direnv export json | from json | default {} | load-env direnv export json | from json | default {} | load-env
{{/if-installed}} {{/if-installed}}
}] }, {
condition: {|before, after| ("project.nu" in (overlay list)) and ($before == null or ($after not-in $before)) }
code: "overlay hide project.nu --keep-env [ PWD ]"
}, {
condition: {|before, after| ("./project.nu" | path exists) and ($before == null or ($after not-in $before)) },
code: "overlay use ./project.nu as project.nu"
}]
} }
} }
menus: [ menus: [

@ -351,9 +351,14 @@ export def gc [
let m = $message | with-flag -m let m = $message | with-flag -m
$message | save -f .git/COMMIT_EDITMSG
git commit -v -e ...$m ...$a ...$n ...$k git commit -v -e ...$m ...$a ...$n ...$k
} else { } else {
let m = $message | with-flag -m let m = $message | with-flag -m
if $message != null {
$message | save -f .git/COMMIT_EDITMSG
}
git commit -v ...$m ...$a ...$n ...$k ...$e git commit -v ...$m ...$a ...$n ...$k ...$e
} }
} }

Loading…
Cancel
Save