[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
colorisation and aliasing
Hi all,
I think I have a few more or less difficult ones. A friend of mine,
using csh has a very nice PS1 prompt, something like
[chris@debian /var]
now, nothing special, but the chris is coloured red and debian is
coloured yellow.
Is it possible to do the same in bash?
secondly he has made a nice cd alias, which after cd-ing ls-es. (?? ;-)
I tried some options, but when I make an alias or script (!) it doesn't
work, for I get the following output:
[chris@debian chris]$ pwd
/home/chris
[chris@debian chris]$ alias cd='cd $1;ls'
[chris@debian chris]$ cd ..
chris chrisold ftp lost+found
# as you can see it jumps to the higher directory
[chris@debian chris]$ pwd
/home/chris
#but jumps back in the end
while the following holds as well:
[chris@debian chris]$ pwd
/home/chris
[chris@debian chris]$ alias cd='cd $1'
[chris@debian chris]$ cd ..
[chris@debian /home]$ pwd
/home
By the way, to make a larger history file, add the following to
~/.bash_profile:
export HISTSIZE='1000'
--
With regards,
C. van Kesteren
-
European Universities' Linux User Groups -- Help list
http://humbolt.geo.uu.nl/eulug/