.K PAT,DIR,-L/S,1/s,2/s,3/s

;A primitive -- and very partial -- emulation of the *n*x 'ls' command.
;Works on the current directory; for others you need the keyword 'DIR'.

echo >ram:__ls<1><2><3> "failat 25"
if "<-l>" EQ ""
 if "<PAT>" EQ ""
  echo >>ram:__ls<1><2><3> "list dir <DIR$*"*"> QUICK"
 else
  echo >>ram:__ls<1><2><3> "list dir <DIR$*"*"> p <PAT> QUICK"
 endif
else
 if "<PAT>" EQ ""
  echo >>ram:__ls<1><2><3> "list dir <DIR$*"*">"
else
  echo >>ram:__ls<1><2><3> "list dir <DIR$*"*"> p <PAT>"
 endif
endif
.bra (
.ket )
echo >>ram:__ls(1)(2)(3) "echo <** ?"
echo >>ram:__ls(1)(2)(3) "endcli"
newcli CON:0/0/639/199/LIST from ram:__ls(1)(2)(3)
