FISH_IS_ROOT_USER(1)

πŸ’… FISH_IS_ROOT_USER(1) β€” a fish-shell page, bestie

okay so picture this: it's a fish-shell manual page, section 1, and it's about to tell you whether you're literally the most powerful user on the box. slay.


✨ NAME ✨

fish_is_root_user β€” check if the current user is root πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

fish_is_root_user

that's it. no flags, no args, no drama. she's a simple girlie. πŸ¦‹


🌸 DESCRIPTION 🌸

fish_is_root_user will check if the current user is root. that's the whole job, and she does it flawlessly, no cap.

it can be useful for the prompt to display something different if the user is root, for example. like, maybe your prompt wants main character energy when you're a normal lil user, and full villain-arc energy when you're root. iykyk. πŸ’€


⭐ EXAMPLE ⭐

a simple example, and yes it's exactly this:

function example --description 'Just an example'
    if fish_is_root_user
        do_something_different
    end
end

see how clean that is? if fish_is_root_user β†’ do the different thing. the vibes are immaculate. πŸ”₯


fish-shell developers


and that's the whole page, bestie β€” no notes, she ate. 🫢 this was fish-shell version 4.9, dated Sep 08, 2026, so go be root (or don't!! be safe!!) and stan πŸ’–βœ¨

πŸ“¦ where this page comes from
  • arch rolling: fish 4.9.3-1 Β· GPL-2.0-only AND BSD-3-Clause AND ISC AND MIT AND PSF-2.0
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms