You are not logged in.
Pages: 1
I'm really stuck. Harvesting my way through all the sources I've had the enlightened idea to make my prompt spit out a color that reflects about the owner of the current directory - such as green for owned, blue for foreign and red for root.
However - I dare not speak but cannot figure how to do that! --- I'd be glad to hear about suggestions where to look though.
---sometimes the obvious isn't there!--- | usermod -l root omnissiah
Offline
https://wiki.archlinux.org/index.php/Color_Bash_Prompt
I don't want to be rude but
-the title of the thread doesn't reflect your real problem
-it took me 15 seconds to find this; you could probably find this on your own
-vets and moderators would tell you about the same; you must do your own research
Offline
Might want to look at the ZSH wiki has some tips on your PS1 https://wiki.archlinux.org/index.php/Zs … our_prompt
Offline
If you search the Google for fancy zsh prompts, you will find that there are many absolutely ridiculous things you can do with a zsh prompt. I am be expert, but having read through a couple of those blog posts, what you are proposing is certainly possible and likely not too incredibly complicated.
Offline
Take a look at sed, ls, and the preprompt function.
Offline
What I figured out so far is to check whether I can read or write to the folder. So, currently I'm using that - plus that I'm using Asterisk's to color out access flags. What my vision implies is that I just get a colored line - which I got colored relative to the writable flag - to see more. I tend to play around with my filesystem a lot - and to see whether I own that folder or if it is just writable would make kindof an awesome treat. Anyhow - I got a bit further - but I can't figure it out.
What I'm using is [[ -w $PWD ]] - while here [http://zsh.sourceforge.net/Doc/Release/ … nsion.html] I read that this formula returns true if pwd is writable. Further down there is the s or f option which would return user specific information - but somehow it doesn't work out. I suppose that these are meant for something else - but I couldn't find anything else so far.
---sometimes the obvious isn't there!--- | usermod -l root omnissiah
Offline
Pages: 1