LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bashrc scripts (https://www.linuxquestions.org/questions/linux-newbie-8/bashrc-scripts-4175578096/)

RoboNux 04-22-2016 05:59 AM

bashrc scripts
 
Hi, is there a website or such where there are downloadable bashrc scripts?

I have seen some really good ones over the years but my attempts to mod mine to that degree have failed.

I want a color coded script with a nice prompt.

I know they are down to personal preference but just didnt know if there was a place out there where people can look at some and take their pick?

Thanks

grail 04-22-2016 08:06 AM

You can probably google for all the things you want to set. I would warn against using someone else's just in case it has errors in it or malicious code which may mess up your system :)

pan64 04-22-2016 08:46 AM

I think color coded scripts are not related to bashrc, but the editor/view you use (or probably I misunderstood something)

Habitual 04-22-2016 08:50 AM

http://www.linuxquestions.org/questi...le-4175518169/

rtmistler 04-22-2016 11:04 AM

You want a color coded script with a nice prompt ...

This sounds like Legally Blonde where she had pink, scented resumes.

OK, sorry for my joke.

I know of nothing particular, but I'd first start web searching for these basic requirements and then be prepared to adapt what you find into some common profile which matches what you want for each.

For instance, you first find out how to get yourself a BASH way to do the prompt you desire. My assumption is that you wish not just a graphical prompt, but instead a prompting process, which queries the person, detects incorrect input, and guides the user so that their usage experience is properly bound, guided, and helpful. That would be one whole set of utilities, which you'd likely have to adapt to be specific to the script choices, per functions of each script; they would however be very similar for the most part.

Next you should search for how to colorize the text from within a script, or based upon the attributes of terminal prompts. This isn't as very easy as it sounds, I've seen people get it all working the way they wish, only to find that they get a different distribution, conditions, or machine, and it doesn't work. "Selecting" the colors is one part, "implementing" them is another part, and I'm saying that the implementation is more difficult - also saying that while it may be easy the first time, it may be more difficult to make that portable to many machines, logins, or other distributions. However I could be erring on the side of too much nay-saying here. Colorization is important, just not to me for my terminal prompts.

Then from that point you'll have two important portions. (1) A manner to prompt and adapt those prompts, and (2) a manner to colorize to some scheme. From there you can then take generic scripts to do functions you choose and add in these common features.

There are likely sample scripts or scripts on blogs in the web which you can copy and re-use, but I have no particular example sites to offer. I myself have usually searched for portions of what I've intended to accomplish, or written them myself and I have found that usually there are examples which cover part or most of what I'd like to do.

Habitual 04-22-2016 11:30 AM

http://www.tldp.org/LDP/abs/html/colorizing.html
https://wiki.archlinux.org/index.php...cape_sequences

may be of additional help.
Colorizing bash output is easy enough.
Script colorizing - not-so-much.

lazydog 04-22-2016 12:28 PM

If I am reading the OP's post correctly he is looking for the output and prompts of his script to be colorized. This should be doable with echo commands.


All times are GMT -5. The time now is 07:26 PM.