Shell Program with color?

Discussion in 'Linux & BSD' started by XxFirebrandxX, Aug 27, 2005.

  1. XxFirebrandxX

    XxFirebrandxX I am a MONKAY!

    Messages:
    15
    Location:
    Pennsylvania
    Does anybody know of a shell program (like Konsole) where the color changes depending on the type of file it is? For instance, regular files would be denoted white (on black), linked files denoted by red, and directories denoted by blue?

    Thanks in advance!
     
  2. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    Having coloured output is set by your shell environment and the ls command itself.

    What shell and operating system are you using?
     
  3. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    usually it is enabled by default, you probably just have to alias your ls command, e.g:

    alias ls="ls -h --color=auto"
     
  4. XxFirebrandxX

    XxFirebrandxX I am a MONKAY!

    Messages:
    15
    Location:
    Pennsylvania
    I'm running FreeBSD 5.4
     
  5. XxFirebrandxX

    XxFirebrandxX I am a MONKAY!

    Messages:
    15
    Location:
    Pennsylvania
    My shell is Konsole under KDE
     
  6. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    set the enviroment variable CLICOLOR and ls will color code the output.
     
  7. LordOfLA

    LordOfLA Godlike!

    Messages:
    7,027
    Location:
    Maidenhead, Berkshire, UK
    or install /usr/ports/misc/gnuls :)
     
  8. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA

    I don't get why people suggest this. Setting an ENV variable is gauranteed success, not everyone can go install a port.
     
  9. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    Again it is just an alias, for csh and FreeBSD I use:

    alias ls ls -FGa
    setenv LSCOLORS "exfxcxdxbxegedabagacad"