From 18537e0ae0820d2f1a93bacb25f8ee6fa28ad59f Mon Sep 17 00:00:00 2001 From: Yaseen Date: Fri, 11 Mar 2022 11:00:57 -0500 Subject: [PATCH] story: allow `|story-write` to also accept a lone title --- pkg/arvo/gen/hood/story-write.hoon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/arvo/gen/hood/story-write.hoon b/pkg/arvo/gen/hood/story-write.hoon index 494b122652..a67236bdab 100644 --- a/pkg/arvo/gen/hood/story-write.hoon +++ b/pkg/arvo/gen/hood/story-write.hoon @@ -5,7 +5,7 @@ /- *story :- %say |= $: [now=@da eny=@uvJ bec=beak] - [[=prose ~] =desk cas=cash ~] + [[title=@t body=$@(~ [p=@t ~])] =desk cas=cash ~] == =/ our p.bec =? desk =(*^desk desk) q.bec :: use current desk if user didn't provide @@ -26,6 +26,7 @@ ~& >> "Error: No story file found. Please use |story-init to create one." helm-pass+[%d %noop ~] =/ tale=story .^(story %cx /(scot %p our)/[desk]/(scot %da now)/story) +=/ =prose [title ?~(body '' p.body)] =. tale (~(put ju tale) tak prose) :- %helm-pass [%c [%info desk %& [/story %ins story+!>(tale)]~]] \ No newline at end of file