history = expand('%TMP%\history.shl'); global = global 'history'
'ALIAS LOADHIST=RX call charout , "Loading history..."; drop prevLine.; i = 0; do while lines(history); i = i+1; prevLine.i = linein(history); end; prevLine.0 = i; call stream history, "c", "close"; say " done."'
'ALIAS SAVEHIST=RX call charout , " Saving history..."; "@if exist" history "del /f" history; xx = (prevLine.0)-100; if (xx<1) then xx=1; do i = xx to prevline.0; call lineout history, prevLine.i; end; call stream history, "c", "close" ; say " done."'
'DEFINE F8 SHELL RX line = insert(date(),line,currOfs); currOfs = currOfs+length(date())'
'DEFINE S-F7 osn rx if currTab = 0 then currTab = findcontextcompletion(); if currTab \= 0 then do; say; do i = 1 to tree.0; say tree.i; end; call charout, print(); oline=""; parse value SysCurPos() with origRow origCol .; key="tab"; end'
'ALIAS recurse=rx rargs = "%*"; if ((rargs="") | left(rargs, 1)="-") then "call xhelp recurse";',
'else do; signal on halt; rcurd = directory(); Call charout ,"Collecting directories... "; call SysFileTree "*", dirs ,"DSO"; Say "Done.";',
'do i_ = 1 to dirs.0; signal on halt; say "["dirs.i_"] >"rargs; call directory dirs.i_; call eval rargs" ^& rx needCR=0"; end; call directory rcurd; end; '
'ALIAS rec=recurse %*'
'ALIAS open=rx what = "%*"; ocurd = directory(); if (left(what, 1)="-") then "call xhelp open"; else do; if (what = "") then what = ocurd;',
'signal on halt; call eval "cd" what; call charout , "Trying to open "directory()"... "; ',
'if SysSetObjectData(directory(),"OPEN=DEFAULT") then say "OK."; else say "failed."; call directory ocurd; end '
'RULE open=%d'
'ALIAS netscape=rx url=stream("%1", "c", "query exists"); if url="" then call eval("start netscape.exe %1"); else call eval("start netscape.exe" url)'