"SfR Fresh" - the SfR Freeware/Shareware Archive 
Member "vil96w32/color-ls.rc" of archive vile-w32.zip:
As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers.
Alternatively you can here view or download the uninterpreted source code file.
That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
1 ; $Id: color-ls.rc,v 1.3 2007/08/07 00:32:16 tom Exp $
2 ; Use this macro to render the output of "color ls" into a vile buffer.
3 store-procedure ShowColorLS "Prompt for, and display a color-ls"
4 ;~trace on
5 ~local %filter %options %lsbuffer $error-buffer %report
6 set-variable %filter &pquote &lookup e+l+p &cat vile-manfilt $exec-suffix
7 ~if &seq %filter ""
8 write-message "[Cannot find manpage-filter]"
9 ~return
10 ~endif
11 ~force set-variable %options &query "options? "
12 ~if &or &error %options &seq %options ""
13 ~return
14 ~endif
15 set-variable %lsbuffer &cat "<ls " &cat %options ">"
16 set terse
17 setl autocolor=0
18 setv %report=$report
19 set report=0
20 ~hidden ~force select-buffer %lsbuffer
21 ~if $status
22 ~local $curline $curcol
23 setl noview
24 ~hidden goto-beginning-of-file
25 ~hidden delete-til end-of-file
26 ~hidden read-file &cat "!ls --color=always " &cat %options &cat " | " %filter
27 ~else
28 ~hidden edit-file &cat "!ls --color=always " &cat %options &cat " | " %filter
29 ~force rename-buffer %lsbuffer
30 ~endif
31 ~hidden goto-beginning-of-file
32 ~hidden attribute-cntl_a-sequences-til end-of-file
33 unmark-buffer
34 setl view
35 ~hidden goto-beginning-of-file
36 ~if $status
37 ~hidden position-window .
38 ~endif
39 ~force error-buffer %lsbuffer
40 write-message "[Done formatting listing.]"
41 set report=%report
42 set noterse
43 ~endm
44 bind-key ShowColorLS ^X-l