home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 March / PCWELT_3_2006.ISO / base / 05_common.mo / usr / share / elvis-2.2_0 / scripts / sfb.ex < prev    next >
Encoding:
Text File  |  2004-02-22  |  895 b   |  29 lines

  1. "Visual directory display a.k.a split file browse
  2. "Written by Dan Fandrich <dan@fch.wimsey.bc.ca>
  3. switch os
  4. case unix  alias sfbrowse split +"fbrowsetweak !*" !ls !*
  5. case win32 alias sfbrowse split +"fbrowsetweak !*" !dir /b /a-d !*
  6. "What are the equivalent commands for OS/2 and whatever other OSes are valid?
  7. default    alias sfbrowse split +"fbrowsetweak !*" !dir !*
  8.  
  9. alias sfb sfbrowse
  10. alias fbrowsetweak {
  11.  "Turn a directory listing into a browsable HTML page
  12.  local report=0 nosaveregexp magicchar=.*
  13.  1,$s/.*/<LI><A HREF="&">&<\/A>/
  14.  local d="!*"
  15.  if d=="" || d=="."
  16.  then eval set d=(getcwd())
  17.  1
  18.  eval insert <HTML><HEAD><TITLE>(d)</TITLE></HEAD><H1>(d)</H1><BODY><MENU>
  19.  $a </MENU></HTML>
  20.  if !userprotocol
  21.  then eval file (d)/
  22.  else 1i <!DOCTYPE user protocol>
  23.  "Move to the first file so that <tab> will move to the second
  24.  1
  25.  /HREF
  26.  set bufdisplay=html nomod locked
  27.  display html
  28. }
  29.