fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Fabian HomborgAdd $EUID and use it in fish_is_root_user2fa51f184

master
328 B14 linesraw
1# To know if the user is root. Used by several prompts to display something
2# else if the user is root.
3
4function fish_is_root_user --description "Check if the user is root"
5    if test "$EUID" = 0 2>/dev/null
6        return 0
7    end
8
9    if contains -- $USER root toor Administrator
10        return 0
11    end
12
13    return 1
14end