vendredi sept. 12, 2008

Colors in OpenSolaris's Terminals (GNU ls and vim)

It's so better to have colors in a Unix Terminal under OpenSolaris. For that I used GNU ls and vim.





I have just re-build GNU ls and make it available from http://mpkgopensolaris.sourceforge.net/pkg/GNUls-6.9-solaris-5.11-i86pc.pkg.bz2.  To Install GNU ls download the File here and: 
# bunzip2 GNUls-6.9-solaris-5.11-i86pc.pkg.bz2
# pkgadd -d ./GNUls-6.9-solaris-5.11-i86pc.pkg
# /usr/bin/gls --version
ls (GNU coreutils) 6.9
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by Richard Stallman and David MacKenzie.

Then create the following alias in your .bashrc file
$ vi ~/.bashrc
ls  () { gls --color $\* ; }


Set TERM to xterm-color in your .bashrc file
$ vi ~/.bashrc
TERM=xterm-color

export TERM


Vim is already bundled with OpenSolaris 2008.05, So you just need to
had the following lines in your file ~/.vimr to get colors when open
files with vi.
if &t_Co > 1
   syntax on
endif


About

Jerome Blanchet

Search

Categories
Archives
« juillet 2014
lun.mar.mer.jeu.ven.sam.dim.
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
   
       
Today