fish-shell/doc_src/cmds/fish_is_root_user.rst
Aaron Gyes af61ea1325 doc_src: Continue the slog through the letter F.
We are using only :: in a synopsis for fishscript examples given
of the command being documented.
2021-12-17 15:16:47 -08:00

29 lines
542 B
ReStructuredText

.. _cmd-fish_is_root_user:
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_user
do_something_different
end
end