diff --git a/dot_config/nushell/config.nu b/dot_config/nushell/config.nu index c1db29f..ec0fcd2 100644 --- a/dot_config/nushell/config.nu +++ b/dot_config/nushell/config.nu @@ -13,6 +13,6 @@ source integrations/zoxide.nu source integrations/atuin.nu source integrations/rip.nu # Finally, we run a system info fetch -if not ("DEVENV_RUNTIME" in $env) { +if not (in-devenv?) { sysfetch } diff --git a/dot_config/nushell/my_config.nu b/dot_config/nushell/my_config.nu index 317e3a0..f666320 100644 --- a/dot_config/nushell/my_config.nu +++ b/dot_config/nushell/my_config.nu @@ -28,7 +28,7 @@ export def main [] { env_change: { PWD: [ {|before, after| # This hook runs onefetch when the current directory is a git repository - if ".git\n" in ($after | ls -a | str join) { + if (not (in-devenv?)) and (".git\n" in ($after | ls -a | str join)) { print (^onefetch --nerd-fonts) } }, diff --git a/dot_config/nushell/utils.nu b/dot_config/nushell/utils.nu index 724d6f5..65d200b 100644 --- a/dot_config/nushell/utils.nu +++ b/dot_config/nushell/utils.nu @@ -58,3 +58,7 @@ export def 'start-lab-session' [ pueue kill $task_id pueue rm $task_id } + +export def in-devenv? [] { + "DEVENV_RUNTIME" in $env +}