# Fun One Liners

**URL:** <https://discourse.julialang.org/t/fun-one-liners/28352>\
**Category:** General Usage\
**Created:** [September 3, 2019, 11:13pm UTC](https://discourse.julialang.org/t/fun-one-liners/28352 "2019-09-03T23:13:18Z")\
**Posts on this page:** 1\
**Showing post:** 57

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [September 14, 2019, 9:03pm UTC](https://discourse.julialang.org/t/fun-one-liners/28352/57 "2019-09-14T21:03:05Z")

</div>

Here is a useful (maybe not so fun) oneliner that I use everywhere. Just put the following line after `module MyPackage` so that `?MyPackage` shows README

```julia
@doc read(joinpath(dirname(@ __DIR__ ), "README.md"), String) MyPackage

```

(It’s based on code I saw somewhere. Maybe it was @mbauman?)

There is also a multi-line version if you want to run doctest on README:

````julia
@doc let path = joinpath(dirname(@ __DIR__ ), "README.md")
    include_dependency(path)
    replace(read(path, String), "```julia" => "```jldoctest")
end MyPackage

````

---

_[View the full topic](https://discourse.julialang.org/t/fun-one-liners/28352)._
