@ixokai said in @scan and search tools for MUX:
As someone with the memory of a gecko, I can't code without @scan.
I'm just saying.
Here's the Rhost equiv of the added features for @scan, @ixokai
&CMD_COMMANDTREE Global: ScanObj <SO>=$+commandtree*:@pemit %#=[switch([!!^setr(1,locate(%#,%0,*))][!!$v(0)],?0,list(lcon(globalroom()),[ansi(hc,[name(%i0)]%(%i0[flags(%i0)]%))][u(fn_pipe,%i0)]),01,CommandTree: Target not found[setq(1,X)],11,[ansi(hc,[name(%q1)]%(%q1[flags(%q1)]%))][u(fn_pipe,%q1)]%r)][ifelse(!match(X,%q1),ansi(hc,<--END))]
&FN_PIPE Global: ScanObj <SO>=[setq(0,lcmds(%0,beep()))][iter(lattr(%0,,$),[ifelse(or(!$v(1),regmatch(extract(%q0,#@,1,beep()),%1)),%r[ljc(ifelse(hasflag(%0/%i0,noprog),ansi(hr,*LK*)),5)][ansi([ifelse(hasflag(%0/%i0,regexp),+orange,+purple)],%i0)] -> [edit(edit(ansi(hg,extract(%q0,#@,1,beep())),*,ansi(hr,*)),?,ansi(hr,?))])])]
&CMD_SEARCHTREE Global: ScanObj <SO>=$+searchtree *:@pemit %#=[list(lcon(globalroom()),[ansi(hc,[name(%i0)]%(%i0[flags(%i0)]%))][u(fn_pipe,%i0,edit(%0,+,%[+%]))])][ifelse(!match(X,%q1),ansi(hc,<--END))]
&CMD_SEARCHBYOBJ Global: ScanObj <SO>=$+searchbyobj *=*:@pemit %#=[list([listdiff([setq(0,locate(%#,%0,*))] [lcon(loc(%q0))],#-1 #-2)],[ansi(hc,[name(%i0)]%(%i0[flags(%i0)]%))][u(fn_pipe,%i0,%1)])][ifelse(!match(X,%q1),ansi(hc,<--END))]
&CMD_SEARCHDB Global: ScanObj <So>=$+searchdb *:@break [lt(bittype(%#),6)]=@pemit %#=Permission denied;@pemit %#=[list(search(eval=%[grep%(##%,*%,*%0*%)%]),[ansi(hc,[name(%i0)]%(%i0[flags(%i0)]%))][u(fn_pipe,%i0,edit(%0,+,%[+%]))])][ifelse(!match(X,%q1),ansi(hc,<--END))]