Thread
:
Nokia N900 - an adventure RPG
View Single Post
nephridium
2010-08-23 , 04:49
Posts: 118 | Thanked: 202 times | Joined on Aug 2010
#
25
Terminal bashing in 16 colors
For those who like a bit more color in their terminals this one should be useful. Check
http://talk.maemo.org/showthread.php?t=40418
for a version of ls that shows different colors for directories/files etc..
ls.color runs on the standard busybox shell environment, but I prefer to use bash which can be obtained through:
sudo apt-get install bash
Being somewhat thumb-lazy I'm using the following terminal commands to call ls.color:
l = simple color files list
ll = detailed color list, newest files at bottom
lll = detailed color list sorted by extensions
To get these commands I added the following lines into
/etc/bash.bashrc
:
alias l='/bin/ls.color'
alias ll='/bin/ls.color -lrt'
alias lll='/bin/ls.color -alX --group-directories-first '
To also have the "
~/folder/ $
" prompt in color you can add this line:
PS1="\e[1;33m\w \e[1;32m\$\e[m "
This will show the folder in yellow and the "$" in green.
More info on the somewhat cryptic "PS1" syntax here:
http://www.cyberciti.biz/faq/bash-sh...linux-or-unix/
Now to invoke bash with all its colorly glory simply type "bash". Or if you're as lazy as I am just create a file called
/usr/bin/b
with this line and make it executable:
/bin/bash
This way you just need to type "b"
With the colored prompt it's easy to see whether bash is already running or just busybox's ksh.
Reward: Upgrades "terminal" minigame from monochrome to EGA mode! CH +1, ST +.5 when in terminal mode
Last edited by nephridium; 2010-08-25 at
17:47
.
Quote & Reply
|
The Following User Says Thank You to nephridium For This Useful Post:
vkv.raju
nephridium
View Public Profile
Send a private message to nephridium
Find all posts by nephridium