Created
December 9, 2016 20:11
-
-
Save colstrom/aee13b4bd1bf9619821eab50c4f07d54 to your computer and use it in GitHub Desktop.
user-is-root.fish: checks if the current user is root
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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