martialblog / cheatsheet

Cool command-line cheatsheet. Open format, grep-able, where you need them most.
MIT License
65 stars 12 forks source link

Support multiple sections #5

Closed leslie-qiwa closed 6 years ago

leslie-qiwa commented 6 years ago

Thanks for making this great tools! Command line tool is exactly what I like.

To ease organize different commands, sometimes, people likes to use separated sections. So can we add this support. Such as I probably want 2 separated sections on GIT. One is for standard workflow, 2nd is command for folk workflow.

martialblog commented 6 years ago

Hey, glad to hear you like it. Thanks for the input, I meant to refactor this thing a while ago. Any help is welcome.

martialblog commented 6 years ago

I've added the possibility to add sections here:

https://github.com/martialblog/cheatsheet/tree/sections

The output would be:

COMMON
Simple example             example foobar
Example with parameter     example foo <PARAMETER>
WORKFLOW
Example in another section example barfoo

Any feedback? Is that what you had in mind?

martialblog commented 6 years ago

I'm gonna merge that

leslie-qiwa commented 6 years ago

is it in master now? seems like not work. actually what I want is more than that. I hope some section layout like this one https://vim.rtorr.com. For now, the workaround is to create separate cheat files.

martialblog commented 6 years ago

@leslie-qiwa have you pulled the latest version? Works fine here and in the tests

leslie-qiwa commented 6 years ago

I thought the section name needn't be included by '[]'. it turns out I'm wrong. If I name it like [section-name], it works. Thanks for the excellent work again!

martialblog commented 6 years ago

Let's add an option to turn it off and on