You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
No problem. Just an idea for a new feature.
Describe the solution you'd like
Currently stdin input is not supported:
$ echo -e "# example\nfoo -bar" | cheat -e somecommand
Too many errors from stdin
Buffer written to ~/.config/cheat/cheatsheets/personal/somecommand.save
failed to edit cheatsheet: exit status 1
$ cheat -e somecommand < echo "snippet"
Too many errors from stdin
Buffer written to ~/.config/cheat/cheatsheets/personal/somecommand.save.1
failed to edit cheatsheet: exit status 1
It would be nice on some occasions to avoid the editor and pipe some
text directly to cheat via a pipe. In other words it would be nice if
$ cat "snippet" >> ~/.config/cheat/cheatsheets/personal/somecommand
The above feature could do the same, check if there is input on stdin, if so avoid
the editor and append the stdin input directly to the end of the cheatsheet.
Additional context
Would enable some automation. Scripts could be written that autogenerate cheatsheets,
but I guess scripts can be written that autogenerate cheatsheets directly without cheat.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
No problem. Just an idea for a new feature.
Describe the solution you'd like
Currently stdin input is not supported:
$ echo -e "# example\nfoo -bar" | cheat -e somecommand
Too many errors from stdin
Buffer written to ~/.config/cheat/cheatsheets/personal/somecommand.save
failed to edit cheatsheet: exit status 1
$ cheat -e somecommand < echo "snippet"
Too many errors from stdin
Buffer written to ~/.config/cheat/cheatsheets/personal/somecommand.save.1
failed to edit cheatsheet: exit status 1
It would be nice on some occasions to avoid the editor and pipe some
text directly to
cheat
via a pipe. In other words it would be nice if$ echo -e "# example\nfoo -bar" | cheat -e somecommand
cheat -e somecommand < echo "snippet"
worked.
I know I could do this:
$ echo -e "# example\nfoo -bar" >> ~/.config/cheat/cheatsheets/personal/somecommand
$ cat "snippet" >> ~/.config/cheat/cheatsheets/personal/somecommand
The above feature could do the same, check if there is input on stdin, if so avoid
the editor and append the stdin input directly to the end of the cheatsheet.
Additional context
Would enable some automation. Scripts could be written that autogenerate cheatsheets,
but I guess scripts can be written that autogenerate cheatsheets directly without
cheat
.The text was updated successfully, but these errors were encountered: