mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-30 14:24:35 +08:00
11 lines
266 B
Fish
11 lines
266 B
Fish
|
# To know if the user is root. Used by several prompts to display something
|
||
|
# else if the user is root.
|
||
|
|
||
|
function fish_is_root_user --description "Check if the user is root"
|
||
|
if contains -- $USER root toor Administrator
|
||
|
return 0
|
||
|
end
|
||
|
|
||
|
return 1
|
||
|
end
|