2022-02-19 01:40:55 +03:00
|
|
|
:: story: Remove any commit message(s) for a given desk, optionally targeting a specific case or prose
|
2021-11-27 04:53:52 +03:00
|
|
|
::
|
|
|
|
::::
|
|
|
|
::
|
2022-01-25 22:54:55 +03:00
|
|
|
/- *story
|
2021-11-27 04:53:52 +03:00
|
|
|
:- %say
|
|
|
|
|= $: [now=@da eny=@uvJ bec=beak]
|
2022-02-06 04:44:26 +03:00
|
|
|
[[syd=desk ~] cas=case prz=prose ~]
|
2021-11-27 04:53:52 +03:00
|
|
|
==
|
|
|
|
::
|
2022-02-06 04:44:26 +03:00
|
|
|
:: XX: story set and story init both have desk and case as optional.
|
|
|
|
:: however, it seems a bit odd to allow both optional here
|
|
|
|
:: since we're dealing with a more hazardous operation.
|
|
|
|
:: should we allow a bare `|story-remove` to remove the last commit message on the current desk?
|
|
|
|
:: leaning towards no, and potentially even making the case non-optional
|
|
|
|
=/ our p.bec
|
|
|
|
=? cas =(*case cas) da+now :: use current commit if cas not provided
|
|
|
|
=/ tak .^(tako:clay %cs /(scot %p our)/[syd]/(scot cas)/tako/~)
|
|
|
|
=/ tale=story .^(story %cx /(scot %p our)/[syd]/(scot %da now)/story)
|
2022-02-06 04:44:26 +03:00
|
|
|
=. tale
|
|
|
|
?: =(*prose prz)
|
|
|
|
(~(del by tale) tak)
|
|
|
|
(~(del ju tale) tak prz)
|
2021-11-27 04:53:52 +03:00
|
|
|
:- %helm-pass
|
|
|
|
[%c [%info syd %& [/story %ins story+!>(tale)]~]]
|