# zed: Enable line wrapping for cli help \(\#42496\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/ec1664f61a34038e7198e00f8d7b780a8ca85114)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: ec1664f61a34038e7198e00f8d7b780a8ca85114

Requested commit: ec1664f61a34038e7198e00f8d7b780a8ca85114

Commit: ec1664f61a34038e7198e00f8d7b780a8ca85114

Tree: 65e9c24b9782cbf96e63fa917f54459c9541442c

Author: kitt

Committer: GitHub

## Message

```
zed: Enable line wrapping for cli help (#42496)

This enables clap's [wrap-help] feature and sets max_term_width to wrap
after 100 columns (the value clap is planning to default to in clap-v5).

This commit also adds blank lines which cause clap to split longer doc
comments into separate help (displayed for `-h`) and long_help
(displayed for `--help`) messages, as per [doc-processing].

[wrap-help]:
https://docs.rs/clap/4.5.49/clap/_features/index.html#optional-features
[doc-processing]:
https://docs.rs/clap/4.5.49/clap/_derive/index.html#pre-processing

![before: some lines of help text stretch across the whole screen.
after: all lines are wrapped at 100 columns, and some manual linebreaks
are preserved where it makes sense (in particular, when listing the
user-data-dir locations on each
platform)](https://github.com/user-attachments/assets/359067b4-5ffb-4fe3-80bd-5e1062986417)


Release Notes:

- N/A
```

## Parents

- [c2c5fceb5bd9aacf243749fbe962c40c501919b9](https://git.cafe/gitcafe/zed/commit/c2c5fceb5bd9aacf243749fbe962c40c501919b9?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/ec1664f61a34038e7198e00f8d7b780a8ca85114?format=markdown)
