Skip to content

Add a plugin.zsh file to be ZSH-framework friendly #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
# iTerm2-shell-integration
Shell integration and utilities for iTerm2

## ZSH framework usage

The repository contains `iTerm2-shell-integration.plugin.zsh` to make it easier to use with ZSH frameworks like zgenom, antigen and oh-my-zsh.

### [Zgenom](https://github.com/jandamm/zgenom)

Add `zgenom load gnachman/iTerm2-shell-integration` to your `.zshrc` with your other load commands, then run `zgenom save` to update its `init.zsh` file. The integration will be automatically loaded the next time you start a ZSH session.

### [Antigen](https://github.com/zsh-users/antigen)

Add `antigen bundle gnachman/iTerm2-shell-integration@main` to your `.zshrc`

☝ **Note** that until <https://github.com/zsh-users/antigen/issues/717> gets fixed in Antigen, it only automatically recognizes plugins on the `master` branch, so you need to explicitly specify `@main` here.

### [Oh-My-Zsh](http://ohmyz.sh/)

1. `git clone --depth 1 https://github.com/gnachman/iTerm2-shell-integration.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-zsh-plugin`
2. Add **iterm2-shell-integration** to your plugin list - edit `~.zshrc` and change `plugins=(...)` to `plugins=(... iterm2-shell-integration)`
7 changes: 7 additions & 0 deletions iTerm2-shell-integration.plugin.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Automagically add the utilities directory to $PATH

# Add utilities to our path
path+=("${0:h}/utilities")

# And source the helper functions, too.
source "${0:h}/shell_integration/zsh"