From e31d0c2fea96172207fe2b8ad2bc9014bc6482ed Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Thu, 18 Jan 2024 09:49:29 +0100 Subject: [PATCH] Anti fudo --- env.nu | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/env.nu b/env.nu index cf7c994..622f3e2 100644 --- a/env.nu +++ b/env.nu @@ -83,6 +83,18 @@ def create_left_prompt [] { "" } + let sudo_compromised = if not (which ^sudo | get path.0) == "/usr/bin/sudo" { + (ansi red_bold) + " ‹sudo compromised›" + (ansi reset) + } else { + "" + } + + let fudo_running = if (do { systemctl status fudo } | complete | get exit_code) == 0 { + (ansi red_bold) + " ‹fudo running›" + (ansi reset) + } else { + "" + } + [ $arrow_color $first_line_arrow @@ -100,6 +112,8 @@ def create_left_prompt [] { $dir $git_branch_content $kube + $sudo_compromised + $fudo_running "\n" $reset_ansi $arrow_color