Replies: 1 comment
-
For showing usage inside of
Wait, that isn't quite usage. Its sometimes usage and sometimes an example. It also is sometimes aligned and sometimes not. Alignment helps with distinguishing it but also takes up even more space. I think I would lean towards only showing usage. The big question is how are people using the I also feel like for a lot of tooling commands, the arguments are optional or obvious, removing a lot of the benefit. The one thing I could see being a point towards usages is the out of box experience for people unfamiliar with this area of tooling (students?). This isn't a "no". I am open to other's thoughts on this.
it might be good to show examples of APIs for what you are wanting. Looking at that |
Beta Was this translation helpful? Give feedback.
-
I have seen some CLI tools special handle having examples for subcommands.
For example:
cmd help:
![Screenshot 2024-08-07 at 00 03 50](https://private-user-images.githubusercontent.com/13135287/355616568-b03de012-ddd0-49cd-910e-4f6647aadc0e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNDkzNjUsIm5iZiI6MTcyNjE0OTA2NSwicGF0aCI6Ii8xMzEzNTI4Ny8zNTU2MTY1NjgtYjAzZGUwMTItZGRkMC00OWNkLTkxMGUtNGY2NjQ3YWFkYzBlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDEzNTEwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMyMTQ1NDc0MDNmZWE5NDVhMGJiODM1NjVjNTNkNTNiZjFkYjgzZTE0OGI0MTJiYTgzYTllMGExOGY5ODc0MjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.INiqeOekS0VZTygh2Aa16I2-nO0OJdBAT-yCNqaKyJc)
cmd run help:
![Screenshot 2024-08-07 at 00 16 01](https://private-user-images.githubusercontent.com/13135287/355616666-3e14f66d-4681-4be0-b6cf-d003fcc3090c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNDkzNjUsIm5iZiI6MTcyNjE0OTA2NSwicGF0aCI6Ii8xMzEzNTI4Ny8zNTU2MTY2NjYtM2UxNGY2NmQtNDY4MS00YmUwLWI2Y2YtZDAwM2ZjYzMwOTBjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDEzNTEwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE4YWU1YjUxOGZhOWQ1NTY1ZGFmN2NlMDEwMmY4NWYwZDhjNjRkZGUwNGRiNzlkYjMyMzBiZmZmODgwMTM5NDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.XvsZMBVoIW12zxmx34DQ6-bTQ9Xg-bTjdAj_B_IkwIE)
the second one is quite simple to add, and the first one as well with a custom help template, but would be nice if we didnt have to have a custom help template and a lot of after_help to handle examples. so basically having examples built-in would be nice
Beta Was this translation helpful? Give feedback.
All reactions