# How to stop \`show\` from printing a type's fully qualified name?

**URL:** <https://discourse.julialang.org/t/how-to-stop-show-from-printing-a-types-fully-qualified-name/34274>\
**Category:** General Usage\
**Tags:** question, type\
**Created:** [February 6, 2020, 10:37pm UTC](https://discourse.julialang.org/t/how-to-stop-show-from-printing-a-types-fully-qualified-name/34274 "2020-02-06T22:37:39Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [February 7, 2020, 8:32am UTC](https://discourse.julialang.org/t/how-to-stop-show-from-printing-a-types-fully-qualified-name/34274/3 "2020-02-07T08:32:10Z")

</div>

When making a custom type, like a `struct` , the author of the custom type often provides a version of `Base.show` specialized to that type. Here is a good pattern to follow:

```julia
struct MyString
    s::String
end

mystring = MyString("my string") # shows: MyString("my string")

# this is used to handle a call to `print`
Base.show(io::IO, x::MyString) = print(io, x.s)
# this is used to show values in the REPL and when using IJulia
Base.show(io::IO, m::MIME"text/plain", x::MyString) = print(io, x.s)

mystring = MyString("my string") # shows: my string
print(mystring) # shows: "my string" 
mystring = MyString("my string") # shows: MyString("my string")

```

this information comes from a Discourse entry written by [Steven G. Johnson](https://discourse.julialang.org/t/what-function-display-does-ijulia-call-at-the-end-of-each-cell/33554/2#)

---

_[View the full topic](https://discourse.julialang.org/t/how-to-stop-show-from-printing-a-types-fully-qualified-name/34274)._
