Anti fudo

This commit is contained in:
Thomas Forgione 2024-01-18 09:49:29 +01:00
parent 511195a7e5
commit e31d0c2fea
1 changed files with 14 additions and 0 deletions

14
env.nu
View File

@ -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 $arrow_color
$first_line_arrow $first_line_arrow
@ -100,6 +112,8 @@ def create_left_prompt [] {
$dir $dir
$git_branch_content $git_branch_content
$kube $kube
$sudo_compromised
$fudo_running
"\n" "\n"
$reset_ansi $reset_ansi
$arrow_color $arrow_color