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
Apple Computing Products:
macOS - Apps and Programs
Show us your OSX 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="IvanLasston" data-source="post: 1352696" data-attributes="member: 145676"><p>I like the homebrew scheme. How about something more interesting - here is my code to setup my bash prompt (put in ~/.profile)</p><p>[code]</p><p>export PS1='\e[0;31m\w\e[m\n\T (\! \j) > '</p><p>[/code]</p><p>everything up to the \n is for directory -> the \n is for newline. \T is for time \! is for job number and \j is for running jobs.</p><p>More info here</p><p><a href="http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html" target="_blank">How to: Change / Setup bash custom prompt (PS1)</a></p><p></p><p>Also because blue doesn't show up well on a black/transparent background I changed my lscolors for directory (note this code snippet is all comment except for the last line (the export line) - which is the actual setup for lscolors) I just keep it all in the ~/.profile so that I have a reference for it.</p><p></p><p>[code]</p><p>#ansi colors for ls</p><p># a black</p><p># b red</p><p># c green</p><p># d brown</p><p># e blue</p><p># f magenta</p><p># g cyan</p><p># h light grey</p><p># A bold black, usually shows up as dark grey</p><p># B bold red</p><p># C bold green</p><p># D bold brown, usually shows up as yellow</p><p># E bold blue</p><p># F bold magenta</p><p># G bold cyan</p><p># H bold light grey; looks like bright white</p><p># x default foreground or background</p><p>#order of LSCOLORS</p><p># 1. directory</p><p># 2. symbolic link</p><p># 3. socket</p><p># 4. pipe</p><p># 5. executable</p><p># 6. block special</p><p># 7. character special</p><p># 8. executable with setuid bit set</p><p># 9. executable with setgid bit set</p><p># 10. directory writable to others, with sticky bit</p><p># 11. directory writable to others, without sticky bit</p><p># 1 2 3 4 5 6 7 8 9 1011</p><p>export LSCOLORS='Hxfxcxdxbxegedabagacad'</p><p>[/code]</p><p></p><p>To use colors - </p><p>[code]</p><p>ls -G </p><p>[/code]</p><p>You can put that as an alias in your .profile </p><p>[code]</p><p>alias ls='ls -G'</p><p>[/code]</p><p></p><p>[ATTACH=full]16640[/ATTACH]</p></blockquote><p></p>
[QUOTE="IvanLasston, post: 1352696, member: 145676"] I like the homebrew scheme. How about something more interesting - here is my code to setup my bash prompt (put in ~/.profile) [code] export PS1='\e[0;31m\w\e[m\n\T (\! \j) > ' [/code] everything up to the \n is for directory -> the \n is for newline. \T is for time \! is for job number and \j is for running jobs. More info here [url=http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html]How to: Change / Setup bash custom prompt (PS1)[/url] Also because blue doesn't show up well on a black/transparent background I changed my lscolors for directory (note this code snippet is all comment except for the last line (the export line) - which is the actual setup for lscolors) I just keep it all in the ~/.profile so that I have a reference for it. [code] #ansi colors for ls # a black # b red # c green # d brown # e blue # f magenta # g cyan # h light grey # A bold black, usually shows up as dark grey # B bold red # C bold green # D bold brown, usually shows up as yellow # E bold blue # F bold magenta # G bold cyan # H bold light grey; looks like bright white # x default foreground or background #order of LSCOLORS # 1. directory # 2. symbolic link # 3. socket # 4. pipe # 5. executable # 6. block special # 7. character special # 8. executable with setuid bit set # 9. executable with setgid bit set # 10. directory writable to others, with sticky bit # 11. directory writable to others, without sticky bit # 1 2 3 4 5 6 7 8 9 1011 export LSCOLORS='Hxfxcxdxbxegedabagacad' [/code] To use colors - [code] ls -G [/code] You can put that as an alias in your .profile [code] alias ls='ls -G' [/code] [ATTACH=full]16640[/ATTACH] [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Apps and Programs
Show us your OSX Terminal.
Top