Back to Fish

fish_is_root_user - check if the current user is root¶

site/docs/3.6/cmds/fish_is_root_user.html

latest614 B
Original Source

fish_is_root_user - check if the current user is root

Synopsis

fish\_is\_root\_user

Description

fish_is_root_user will check if the current user is root. It can be useful for the prompt to display something different if the user is root, for example.

Example

A simple example:

function example --description 'Just an example'if fish\_is\_root\_userdo\_something\_differentendend