Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
color on the terminal
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="cradom" data-source="post: 127997" data-attributes="member: 305283"><p>My mistake, look under 'window settings - color', about halfway down, just under the color boxes.</p><p></p><p>If you type 'ls man' all you're going to get is "no such file or directory" unless you happen to be in /bin. 'man ls' will give a really long man page on the ls command.</p><p></p><p>Here is my .bashrc file. Copy whatever you want (the prompt stuff is custom and wont work without the other .bash_styles file), save it, quit terminal and re-start it. You "should" have different colors for your files.</p><p></p><p>[code]</p><p># ~/.bashrc: executed by bash(1) for non-login shells.</p><p></p><p>export PS1='\u@\h:\w$ '</p><p>umask 022</p><p></p><p>##########################################</p><p>#setting up file completion</p><p>#</p><p></p><p>if [ -f ~/.bash_completion ];</p><p>then</p><p> . ~/.bash_completion;</p><p>fi</p><p></p><p>##########################################</p><p># advanced prompt settings</p><p>#</p><p></p><p>if [ -f ~/.bash_styles ];</p><p>then</p><p> . ~/.bash_styles old;</p><p>fi</p><p></p><p>#export TERM='xterm-color'</p><p>#export NNTPSERVER='news.unina.it'</p><p>export EDITOR='pico'</p><p></p><p>PATH="/usr/local/bin:/usr/include:${PATH}"</p><p>export PATH</p><p></p><p>############################################</p><p># You may uncomment the following lines if you want `ls' to be colorized:</p><p>#</p><p></p><p> export CLICOLOR='true'</p><p> export LSCOLORS="gxfxcxdxbxegedabagacad"</p><p> </p><p>###########################################</p><p># set up aliases</p><p>#</p><p> </p><p>alias ll='ls -lagh'</p><p>alias l='ls -lagh'</p><p>alias grep='grep -n'</p><p>alias netconns='netstat -a -f inet'</p><p>alias cd..='cd ..'</p><p>alias ..='cd ..'</p><p>alias work='cd ~/working'</p><p>alias dl='cd /volumes/hd4/" downloads"'</p><p>alias d4='cd /volumes/hd4'</p><p>alias cls='clear'</p><p># alias vi='vim'</p><p># alias c++='g++'</p><p># alias cc='gcc'</p><p>#</p><p># Some more alias to avoid making mistakes:</p><p># alias rm='rm -i'</p><p># alias cp='cp -i'</p><p># alias mv='mv -i'</p><p>alias ttop='top -ocpu -R -F -s 2 -n30'</p><p></p><p>############################################</p><p># some aliases to set fancy prompts</p><p># see .bash_prompt for further informations</p><p>#</p><p></p><p>if [ -f ~/.bash_styles ];</p><p>then</p><p> alias dumb='. ~/.bash_styles dumb'</p><p> alias ice='. ~/.bash_styles ice'</p><p> alias fire='. ~/.bash_styles fire'</p><p> alias nature='. ~/.bash_styles nature'</p><p> alias sunshine='. ~/.bash_styles sunshine'</p><p> alias dream='. ~/.bash_styles dream'</p><p> alias magic='. ~/.bash_styles magic'</p><p> alias testp='. ~/.bash_styles testp'</p><p> alias old='. ~/.bash_styles old'</p><p>fi</p><p>source /sw/bin/init.sh</p><p></p><p>[/code]</p><p></p><p>And of course the last line is for fink.</p><p>Good luck and let us know what happens.</p><p></p><p>PS<img src="/images/smilies/angel.gif" class="smilie" loading="lazy" alt=":a" title="Angel :a" data-shortname=":a" />fter you do this try typing 'env' and see if it says anything about clicolor anywhere.</p></blockquote><p></p>
[QUOTE="cradom, post: 127997, member: 305283"] My mistake, look under 'window settings - color', about halfway down, just under the color boxes. If you type 'ls man' all you're going to get is "no such file or directory" unless you happen to be in /bin. 'man ls' will give a really long man page on the ls command. Here is my .bashrc file. Copy whatever you want (the prompt stuff is custom and wont work without the other .bash_styles file), save it, quit terminal and re-start it. You "should" have different colors for your files. [code] # ~/.bashrc: executed by bash(1) for non-login shells. export PS1='\u@\h:\w$ ' umask 022 ########################################## #setting up file completion # if [ -f ~/.bash_completion ]; then . ~/.bash_completion; fi ########################################## # advanced prompt settings # if [ -f ~/.bash_styles ]; then . ~/.bash_styles old; fi #export TERM='xterm-color' #export NNTPSERVER='news.unina.it' export EDITOR='pico' PATH="/usr/local/bin:/usr/include:${PATH}" export PATH ############################################ # You may uncomment the following lines if you want `ls' to be colorized: # export CLICOLOR='true' export LSCOLORS="gxfxcxdxbxegedabagacad" ########################################### # set up aliases # alias ll='ls -lagh' alias l='ls -lagh' alias grep='grep -n' alias netconns='netstat -a -f inet' alias cd..='cd ..' alias ..='cd ..' alias work='cd ~/working' alias dl='cd /volumes/hd4/" downloads"' alias d4='cd /volumes/hd4' alias cls='clear' # alias vi='vim' # alias c++='g++' # alias cc='gcc' # # Some more alias to avoid making mistakes: # alias rm='rm -i' # alias cp='cp -i' # alias mv='mv -i' alias ttop='top -ocpu -R -F -s 2 -n30' ############################################ # some aliases to set fancy prompts # see .bash_prompt for further informations # if [ -f ~/.bash_styles ]; then alias dumb='. ~/.bash_styles dumb' alias ice='. ~/.bash_styles ice' alias fire='. ~/.bash_styles fire' alias nature='. ~/.bash_styles nature' alias sunshine='. ~/.bash_styles sunshine' alias dream='. ~/.bash_styles dream' alias magic='. ~/.bash_styles magic' alias testp='. ~/.bash_styles testp' alias old='. ~/.bash_styles old' fi source /sw/bin/init.sh [/code] And of course the last line is for fink. Good luck and let us know what happens. PS:after you do this try typing 'env' and see if it says anything about clicolor anywhere. [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
color on the terminal
Top