# Howdoi - Instant answers from the (kak) command line

**URL:** <https://discuss.kakoune.com/t/howdoi-instant-answers-from-the-kak-command-line/777>\
**Category:** Recipes & Guides\
**Tags:** plugins\
**Created:** [November 3, 2019, 7:12pm UTC](https://discuss.kakoune.com/t/howdoi-instant-answers-from-the-kak-command-line/777 "2019-11-03T19:12:52Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![TeddyDD](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/teddydd/32/21_2.png) [@TeddyDD](https://discuss.kakoune.com/u/TeddyDD)\
**Post date:** [November 5, 2019, 6:45pm UTC](https://discuss.kakoune.com/t/howdoi-instant-answers-from-the-kak-command-line/777/4 "2019-11-05T18:45:12Z")

</div>

[http://cheat.sh/](http://cheat.sh/)

```auto
declare-option -hidden str cheat_filetype
define-command -params 1.. cheat %{
    set-option global cheat_filetype %opt{filetype}
    try %{ delete-buffer! *cheat* }
    edit -scratch *cheat*
    execute-keys "!curl cheat.sh/%opt{cheat_filetype}/%sh{echo $@ | tr ' ' '+'}<ret>"
    ansi-render
}

```

Needs [kak-ansi](https://github.com/eraserhd/kak-ansi) plugin, if you don’t want to use it you can change curl query to

```diff
+ execute-keys "!curl cheat.sh/%opt{cheat_filetype}/%sh{echo $@ | tr ' ' '+'}/T<ret>"
- execute-keys "!curl cheat.sh/%opt{cheat_filetype}/%sh{echo $@ | tr ' ' '+'}<ret>"
- ansi-render

```

---

_[View the full topic](https://discuss.kakoune.com/t/howdoi-instant-answers-from-the-kak-command-line/777)._
