LinuxQuestions.org
Visit Jeremy's Blog.
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, 06: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, 09:06 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,423

Rep: Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823
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, 09:46 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,491

Rep: Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429
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, 09:50 AM   #4
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,663
Blog Entries: 10

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
http://www.linuxquestions.org/questi...le-4175518169/
 
Old 04-22-2016, 12:04 PM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,466
Blog Entries: 10

Rep: Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639
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, 12:30 PM   #6
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,663
Blog Entries: 10

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
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, 01:28 PM   #7
lazydog
Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 829
Blog Entries: 1

Rep: Reputation: 137Reputation: 137
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09: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 06:04 PM
~/.bashrc, /etc/bash.bashrc files not read? Tachtory Slackware 3 01-04-2014 01:25 AM
[SOLVED] How to use my /home/kangjoo/.bashrc rather than root/.bashrc kangjoo.lee Linux - Newbie 2 11-05-2012 04:38 PM
Setting path: /etc/profile, /etc/bashrc or ~/.bashrc Swakoo Linux - General 1 08-07-2007 11:59 PM


All times are GMT -5. The time now is 08:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration