Add a function to check if the user is root.#7123
Conversation
559fc8e to
5669271
Compare
|
Thank you for your effort! What I'd really like to see, and what makes the entire thing with the function worthwhile, is to have it used in all of our sample prompts that do this check. E.g. the "debian chroot" prompt has this bit: fish-shell/share/tools/web_config/sample_prompts/debian_chroot.fish Lines 22 to 33 in f2d5f95 In essence, whenever a prompt checks if the user is "root" anywhere, it should be using that function instead. That includes now using the function whether it used to check for "root" or "toor" or just for "root". The actual coloring and using symbols can stay in the prompt, however. So: If you're feeling up for it, please check the sample_prompts directory for such uses and replace them with this function. |
Add a helper function to check if the user is root. This function can be useful for the prompts for example. Modify the prompts made root checked to use the function instead. Add also the support of Administrator like a root user. Fixes: fish-shell#7031
5669271 to
8badb1b
Compare
|
I think now I have modified all prompts. Do you see something else, I can modify? |
|
Thank you very much, merged! |
Add a helper function to check if the user is root. This function can be
useful for the prompts for example. Modify the prompts made root checked
to use the function instead. Add also the support of Administrator like
a root user.
Fixes: #7031