home *** CD-ROM | disk | FTP | other *** search
/ Dream 49 / Amiga_Dream_49.iso / beos / utils / ls-color.txt < prev    next >
Text File  |  1998-02-10  |  2KB  |  38 lines

  1.          File: ls-color.zip
  2.        Author: Talin
  3.       Release: Aug 5th, 1997
  4. Compatibility: PR1
  5.      Location: contrib/util/shell
  6.   Description: 'ls' but with directory names in color.
  7.         Notes: 
  8.  
  9. This is a hacked version of the GNU 'ls' tool that comes with the BeOS distribution.
  10.  
  11. I have modified it to display the names directories, symlinks, and program files
  12. in various colors, using the ANSI escape sequences for color control. Currently
  13. the colors are hard-coded.
  14.  
  15. The color-coding is enabled only when you specify the -z or -Z flag on the command
  16. line. I chose the letter 'z' because it was one of the few letters not already
  17. used. The 'Z' option turns on coloring of directories, symlinks and executables;
  18. The 'z' option turns on coloring for directories and symlinks only. The default
  19. is no coloring, otherwise the use of this program might mess up shell scripts which
  20. attempt to parse the output of a directory listing. I suggest putting the following
  21. line in your profile:
  22.  
  23.     alias ls='ls -Z'
  24.  
  25. I'm sure that there are other versions of 'ls' that use a more standard way of
  26. turning on and off color, and which use environment variables to control which
  27. colors are used. However, I don't know where any of them are, so this will have
  28. to do for now.
  29.  
  30. Feel free to modify this program and re-upload it to the Be FTP site. Since this
  31. is GNU code, and I only modified a few lines of it, I can't really claim it as
  32. my own. But I'd be interested if anyone could come up with further visual
  33. enhancements. (But keep it subtle!)
  34.  
  35. -- Talin
  36.  
  37. Talin@ACM.org
  38.