Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommended way to list cheatsheets among *all* cheat directories #548

Closed
be-rock opened this issue Mar 25, 2020 · 5 comments · Fixed by #606
Closed

Recommended way to list cheatsheets among *all* cheat directories #548

be-rock opened this issue Mar 25, 2020 · 5 comments · Fixed by #606

Comments

@be-rock
Copy link

be-rock commented Mar 25, 2020

If i have a community sourced cheatsheet in readonly: true but i want to supplement that data with what's in my personal cheatsheet, how do i get the output of cheat to show info from both cheatpath community and cheatpath personal.

E.g. $ cheat tar
will show results from both community and personal dirs.

@chrisallenlane
Copy link
Member

@be-rock, there is currently no way to do this. I can see the value in this feature, though. (I've wished I had this once or twice myself already.)

Proposal: what about adding an --all (-a) flag that displays output from all sources (rather than the most "local" source)? I don't think that would entail a huge amount of effort.

@be-rock
Copy link
Author

be-rock commented Mar 26, 2020

that sounds like a great solution to me. and maybe even an option during setup to set the default directory criteria e.g. [community|personal|work|all]. or an even simpler solution would be to simply alias cheat to alias cheat='cheat --all'.

Regardless, thank you and keep up the great work on this awesome tool :)

@chrisallenlane
Copy link
Member

Update: solving this properly will actually require more effort than I initially estimated. I still intend to do it - I just need to find the time. I'm hoping to be able to address this some time within the next two weeks.

chrisallenlane added a commit to chrisallenlane/cheat that referenced this issue Nov 27, 2020
Implement an `--all` flag that can be used to view cheatsheets on all
chaetpaths. (Resolves cheat#548)
@chrisallenlane chrisallenlane mentioned this issue Nov 28, 2020
@chrisallenlane
Copy link
Member

Well, this took a little longer than "two weeks", but the --all flag is available as of release 4.2.0:
https://github.com/cheat/cheat/releases/tag/4.2.0

@linnabraham
Copy link

Well, this took a little longer than "two weeks", but the --all flag is available as of release 4.2.0:
https://github.com/cheat/cheat/releases/tag/4.2.0

This was a feature that I wanted for sometime now. Thanks for implementing it.
However, I was thinking of aliasing cheat to cheat --all. But it looks like when using the -all flag, the priority gets reversed. The community cheatsheets shows up first which seems counter-intuitive to me. I would like my personal cheatsheets to take preference. Am i missing something here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants