Skip to content

Latest commit

 

History

History
68 lines (44 loc) · 1.54 KB

zsh.md

File metadata and controls

68 lines (44 loc) · 1.54 KB

Zsh

ohmyzsh

What is ohmyzsh?

Why use ohmyzsh?

  • Aliases:

    • ~, .., /
    • d: alias for dirs: lists last visited directories
    • cd +n:
      • -: alias for cd 0
      • 1: alias for cd 1
      • 2,..., 9: alias for cd 2, ..., cd 9
  • Plugins:

    ohmyzsh is bundled with a lot of plugins, which allow you to take advantage of functionality of many sorts to your shell just by enabling them.

    e.g. git, sudo, last-working-dir, globalias, kubectl

    [!TIP] For more information, see

How to use ohmyzsh?

  • Reload zsh config:

    • Restart terminal

    • Restart zsh session with:

      • omz reload

        # Restart the current Zsh session and Oh My Zsh:
        omz reload

        [!TIP] What does omz reload do? It simply run exec zsh1

      • exec

        exec zsh

Caution

You shouldn't run source ~/.zshrc to reload your zsh config.

Packages manager

Antidote

antidote is my current package manager for zsh

antidote allows deferred loading for plugins that support it.

Footnotes

  1. https://github.com/ohmyzsh/ohmyzsh/blob/31f2025e0fa963788655fe197e0179c47588b175/lib/cli.zsh#L625C10-L625C14