Tooltips
info
Due to limitations (or not having found a way just yet), this feature only works in fish
, zsh
, powershell
and cmd
(as of Clink v1.2.46+) for
the time being.
Tooltips are segments that are rendered as a right-aligned prompt while you're typing certain keywords.
They behave similarly to the other segments when it comes to how and when they are shown so you can tweak
them to act and look like you want. The key difference is that they can be invoked using tips
which are the
commands you are typing. Due to the possibility of the use of an alias, you can define for which keyword
the segment should be rendered.
#
ConfigurationYou need to extend or create a custom theme with your tooltips. For example:
This configuration will render a right-aligned git segment when you type git
or g
followed by a space.
A tip should not include any leading or trailing space but an interpolated one can be used, e.g., g s
.
Keep in mind that this is a blocking call, meaning that if the segment renders slow, you can't type until it's visible. Optimizations in this space are being explored.
#
Enable the feature- powershell
- zsh
- fish
Import/invoke Oh My Posh in your $PROFILE
and add the following line below:
For example:
Restart your shell or reload your $PROFILE
using . $PROFILE
for the changes to take effect.
Invoke Oh My Posh in .zshrc
and add the following line below:
Restart your shell or reload .zshrc
using exec zsh
for the changes to take effect.
Invoke Oh My Posh in ~/.config/fish/config.fish
and add the following line below:
Restart your shell or reload fish using exec fish
for the changes to take effect.