Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 1.71 KB

File metadata and controls

48 lines (39 loc) · 1.71 KB

--body-file: context-specific file input

--body-file PATH supplies the long, multi-line text input for the command where it appears. It is deliberately a context-specific argument, rather than a global synonym for one particular field: PATH is read verbatim, and - reads from standard input.

This avoids placing a multi-line document in one shell argument. It also makes the command’s purpose clear at the call site: the surrounding subcommand says which body is being supplied.

Current contexts

  • lc issue create --body-file PATH supplies the new issue’s description. It is mutually exclusive with --description.

  • lc issue comment ISSUE_ID --body-file PATH supplies the new comment body. It is mutually exclusive with --comment.

Planned update context

lc issue update ISSUE_ID --body-file PATH will supply the issue description being updated. It will be mutually exclusive with --description; it must not change the meaning of --comment, --reason, or any other update input.

For example:

$ lc issue create --title "Design notes" --body-file design-notes.md
$ lc issue comment EXT-123 --body-file review.md
$ lc issue update EXT-123 --body-file revised-description.md
$ printf '%s\\n' 'A comment from stdin' | lc issue comment EXT-123 --body-file -

The update example above documents the intended interface; it becomes usable when the corresponding issue update work is implemented.