LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-22-2016, 05:59 AM   #1
RoboNux
LQ Newbie
 
Registered: Apr 2016
Posts: 1

Rep: Reputation: Disabled
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
 
Old 04-22-2016, 08:06 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
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
 
Old 04-22-2016, 08:46 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
I think color coded scripts are not related to bashrc, but the editor/view you use (or probably I misunderstood something)
 
Old 04-22-2016, 08:50 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
http://www.linuxquestions.org/questi...le-4175518169/
 
Old 04-22-2016, 11:04 AM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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.
 
Old 04-22-2016, 11:30 AM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
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.
 
Old 04-22-2016, 12:28 PM   #7
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does /etc/bashrc sources scripts in /etc/profile.d/ ? leniviy Red Hat 2 04-08-2015 08:24 AM
[SOLVED] /etc/bashrc ,dircolors and /root/.bash_profile ,/.bashrc not exist in LFS-7.5(sec9.3) jaassi Linux From Scratch 2 09-20-2014 05:04 PM
~/.bashrc, /etc/bash.bashrc files not read? Tachtory Slackware 3 01-04-2014 12:25 AM
[SOLVED] How to use my /home/kangjoo/.bashrc rather than root/.bashrc kangjoo.lee Linux - Newbie 2 11-05-2012 03:38 PM
Setting path: /etc/profile, /etc/bashrc or ~/.bashrc Swakoo Linux - General 1 08-07-2007 10:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration