Repository: Textualize/rich

Issue:
[BUG] Rich's IPython extension doesn't work
**Describe the bug**

When trying to use `%load_ext rich` in **IPython** on Terminal it says following:
```
%Python 3.10.3 (main, Mar 17 2022, 04:46:20) [Clang 12.0.8 (https://android.googlesource.com/toolchain/llvm-project c935d99d7
Type 'copyright', 'credits' or 'license' for more information
IPython 8.1.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: %load_ext rich
The rich module is not an IPython extension.
```

**Platform**
<details>
<summary>Click to expand</summary>

What platform (Win/Linux/Mac) are you running on? What terminal software are you using?

I may ask you to copy and paste the output of the following commands. It may save some time if you do it now.

If you're using Rich in a terminal:

```
python -m rich.diagnose
pip freeze | grep rich
```

If you're using Rich in a Jupyter Notebook, run the following snippet in a cell
and paste the output in your bug report.

```python
from rich.diagnose import report
report()
```

</details>

```
❯ python -m rich.diagnose
pip freeze | grep rich
╭────────────────── <class 'rich.console.Console'> ──────────────────╮
│ A high level console interface.                                    │
│                                                                    │
│ ╭────────────────────────────────────────────────────────────────╮ │
│ │ <console width=70 ColorSystem.TRUECOLOR>                       │ │
│ ╰────────────────────────────────────────────────────────────────╯ │
│                                                                    │
│     color_system = 'truecolor'                                     │
│         encoding = 'utf-8'                                         │
│             file = <_io.TextIOWrapper name='<stdout>' mode='w'     │
│                    encoding='utf-8'>                               │
│           height = 45                                              │
│    is_alt_screen = False                                           │
│ is_dumb_terminal = False                                           │
│   is_interactive = True                                            │
│       is_jupyter = False                                           │
│      is_terminal = True                                            │
│   legacy_windows = False                                           │
│         no_color = False                                           │
│          options = ConsoleOptions(                                 │
│                        size=ConsoleDimensions(                     │
│                            width=70,                               │
│                            height=45                               │
│                        ),                                          │
│                        legacy_windows=False,                       │
│                        min_width=1,                                │
│                        max_width=70,                               │
│                        is_terminal=True,                           │
│                        encoding='utf-8',                           │
│                        max_height=45,                              │
│                        justify=None,                               │
│                        overflow=None,                              │
│                        no_wrap=False,                              │
│                        highlight=None,                             │
│                        markup=None,                                │
│                        height=None                                 │
│                    )                                               │
│            quiet = False                                           │
│           record = False                                           │
│         safe_box = True                                            │
│             size = ConsoleDimensions(width=70, height=45)          │
│        soft_wrap = False                                           │
│           stderr = False                                           │
│            style = None                                            │
│         tab_size = 8                                               │
│            width = 70                                              │
╰────────────────────────────────────────────────────────────────────╯
╭─── <class 'rich._windows.WindowsConsoleFeatures'> ────╮
│ Windows features available.                           │
│                                                       │
│ ╭───────────────────────────────────────────────────╮ │
│ │ WindowsConsoleFeatures(vt=False, truecolor=False) │ │
│ ╰───────────────────────────────────────────────────╯ │
│                                                       │
│ truecolor = False                                     │
│        vt = False                                     │
╰───────────────────────────────────────────────────────╯
╭────── Environment Variables ───────╮
│ {                                  │
│     'TERM': 'xterm-256color',      │
│     'COLORTERM': 'truecolor',      │
│     'CLICOLOR': None,              │
│     'NO_COLOR': None,              │
│     'TERM_PROGRAM': None,          │
│     'COLUMNS': None,               │
│     'LINES': None,                 │
│     'JPY_PARENT_PID': None,        │
│     'VSCODE_VERBOSE_LOGGING': None │
│ }                                  │
╰────────────────────────────────────╯
platform="Linux"
rich @ file:///storage/emulated/0/Projects/rich
```

[![asciicast](https://asciinema.org/a/Xd3qDv897tjdEll0csW5XZk0T.svg)](https://asciinema.org/a/Xd3qDv897tjdEll0csW5XZk0T)


Discussion:

Resolving patch:
diff --git a/rich/__init__.py b/rich/__init__.py
--- a/rich/__init__.py
+++ b/rich/__init__.py
@@ -3,6 +3,7 @@
 import os
 from typing import Callable, IO, TYPE_CHECKING, Any, Optional, Union
 
+from ._extension import load_ipython_extension
 
 __all__ = ["get_console", "reconfigure", "print", "inspect"]
 


Test patch: