clink icon indicating copy to clipboard operation
clink copied to clipboard

How to know in clink.lua if the prompt is launched as superuser?

Open Apjue opened this issue 6 years ago • 1 comments

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?

Apjue avatar May 24 '18 18:05 Apjue

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.

chrisant996 avatar Jul 27 '21 03:07 chrisant996