Added missing function - old fish
This commit is contained in:
parent
4f54b9ebfe
commit
b686a8d91a
12
fish_cfg/functions/fish_is_root_user.fish
Normal file
12
fish_cfg/functions/fish_is_root_user.fish
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Defined in /usr/share/fish/functions/fish_is_root_user.fish @ line 4
|
||||||
|
function fish_is_root_user --description 'Check if the user is root'
|
||||||
|
if test "$EUID" = 0 2>/dev/null
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if contains -- $USER root toor Administrator
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
return 1
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user