clink
clink copied to clipboard
How to know in clink.lua if the prompt is launched as superuser?
I want to customize prompt by adding a '$'/'#' if it is launched in superuser/administrator. Is there a way to know it from clink.lua?
I recommend looking up how batch scripts can tell whether cmd.exe is running with administrator privileges. There are many different approaches out there, with various pros and cons to them. Here is a random sample article with a few approaches that might work.