From a6189648f44dcb6d4937a77f9a9afb051380a398 Mon Sep 17 00:00:00 2001 From: midden-fabler Date: Tue, 13 Jun 2023 02:02:36 -0400 Subject: [PATCH] dojo: complete teds in dirs --- pkg/arvo/app/dojo.hoon | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/pkg/arvo/app/dojo.hoon b/pkg/arvo/app/dojo.hoon index 7ab5978291..a1094717fc 100644 --- a/pkg/arvo/app/dojo.hoon +++ b/pkg/arvo/app/dojo.hoon @@ -1510,17 +1510,35 @@ :: ++ complete-naked-ted |= ted=term - =/ pax=path + |^ + =/ pfix=path /(scot %p our.hid)/[q:he-beam]/(scot %da now.hid)/ted + =+ .^(paths=(list path) %ct pfix) %+ complete (cat 3 '-' ted) - %+ murn ~(tap by dir:.^(arch %cy pax)) - |= [=term ~] - ^- (unit [^term tank]) - ?. =(ted (end [3 (met 3 ted)] term)) + %+ murn paths + |= =path + ^- (unit [term tank]) + ?~ path ~ - ?~ =<(fil .^(arch %cy (weld pax ~[term %hoon]))) + ?~ t.path ~ - `[(cat 3 '-' term) *tank] + ?. =(%hoon (rear t.path)) + ~ + =/ =cord + %- crip + (path-heps (snip `^path`t.path)) + ?. =(ted (end [3 (met 3 ted)] cord)) + ~ + `[(cat 3 '-' cord) *tank] + :: + ++ path-heps + |= a=path ^- tape + ?~ a "" + |- ^- tape + %+ welp (trip i.a) + ?~ t.a "" + ['-' $(a t.a)] + -- :: ++ complete |= [completing=term options=(list [term tank])]