mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-03 04:40:50 +03:00
story: make |story-{set,remove} use $cash instead of $case
This commit is contained in:
parent
b616f48169
commit
4b04da5a9a
@ -5,7 +5,7 @@
|
|||||||
/- *story
|
/- *story
|
||||||
:- %say
|
:- %say
|
||||||
|= $: [now=@da eny=@uvJ bec=beak]
|
|= $: [now=@da eny=@uvJ bec=beak]
|
||||||
[[syd=desk ~] cas=case prz=prose ~]
|
[[syd=desk ~] cas=cash prz=prose ~]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: XX: story set and story init both have desk and case as optional.
|
:: XX: story set and story init both have desk and case as optional.
|
||||||
@ -15,7 +15,12 @@
|
|||||||
:: leaning towards no, and potentially even making the case non-optional
|
:: leaning towards no, and potentially even making the case non-optional
|
||||||
=/ our p.bec
|
=/ our p.bec
|
||||||
=? cas =(*case cas) da+now :: use current commit if cas not provided
|
=? cas =(*case cas) da+now :: use current commit if cas not provided
|
||||||
=/ tak .^(tako:clay %cs /(scot %p our)/[syd]/(scot cas)/tako/~)
|
|
||||||
|
=/ tak
|
||||||
|
?: ?=([%tako tako:clay] cas)
|
||||||
|
p.cas
|
||||||
|
.^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~)
|
||||||
|
::
|
||||||
=/ tale=story .^(story %cx /(scot %p our)/[syd]/(scot %da now)/story)
|
=/ tale=story .^(story %cx /(scot %p our)/[syd]/(scot %da now)/story)
|
||||||
=. tale
|
=. tale
|
||||||
?: =(*prose prz)
|
?: =(*prose prz)
|
||||||
|
@ -5,19 +5,20 @@
|
|||||||
/- *story
|
/- *story
|
||||||
:- %say
|
:- %say
|
||||||
|= $: [now=@da eny=@uvJ bec=beak]
|
|= $: [now=@da eny=@uvJ bec=beak]
|
||||||
[[=prose ~] =desk cas=case ~]
|
[[=prose ~] =desk cas=cash ~]
|
||||||
==
|
==
|
||||||
::
|
|
||||||
::
|
|
||||||
::
|
|
||||||
=/ our p.bec
|
=/ our p.bec
|
||||||
=? desk =(*^desk desk) q.bec :: use current desk if user didn't provide
|
=? desk =(*^desk desk) q.bec :: use current desk if user didn't provide
|
||||||
?: !(~(has in .^((set ^desk) %cd /(scot %p our)/$/(scot %da now))) desk)
|
?: !(~(has in .^((set ^desk) %cd /(scot %p our)/$/(scot %da now))) desk)
|
||||||
~& >> "Error: desk {<desk>} does not exist."
|
~& >> "Error: desk {<desk>} does not exist."
|
||||||
helm-pass+[%d %noop ~]
|
helm-pass+[%d %noop ~]
|
||||||
=? cas =(*case cas) da+now :: use current commit if cas not provided
|
=? cas =(*case cas) da+now :: use current commit if cas not provided
|
||||||
|
:: TODO case existence check
|
||||||
=/ tak .^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~)
|
=/ tak
|
||||||
|
?: ?=([%tako tako:clay] cas)
|
||||||
|
p.cas
|
||||||
|
.^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~)
|
||||||
|
::
|
||||||
=/ tale=story .^(story %cx /(scot %p our)/[desk]/(scot %da now)/story)
|
=/ tale=story .^(story %cx /(scot %p our)/[desk]/(scot %da now)/story)
|
||||||
=. tale (~(put ju tale) tak prose)
|
=. tale (~(put ju tale) tak prose)
|
||||||
:- %helm-pass
|
:- %helm-pass
|
||||||
|
Loading…
Reference in New Issue
Block a user