Skip to content

Instantly share code, notes, and snippets.

@colstrom
Created December 9, 2016 20:11
Show Gist options
  • Select an option

  • Save colstrom/aee13b4bd1bf9619821eab50c4f07d54 to your computer and use it in GitHub Desktop.

Select an option

Save colstrom/aee13b4bd1bf9619821eab50c4f07d54 to your computer and use it in GitHub Desktop.
user-is-root.fish: checks if the current user is root
name = user-is-root
author = Chris Olstrom
license = MIT
provides = fish/functions/user-is-root
requires
command/id
fish/builtin/end
fish/builtin/function
fish/functions/status-to-bool
function user-is-root
status-to-bool (id -u)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment