Git Product home page Git Product logo

antigen's Introduction

Antigen
Antigen v2

The plugin manager for zsh.

Latest Build Status Build Status

Installation | Documentation | Bug tracker | Roadmap | Chat | License

Antigen is a small set of functions that help you easily manage your shell (zsh) plugins, called bundles. The concept is pretty much the same as bundles in a typical vim+pathogen setup. Antigen is to zsh, what Vundle is to vim.

Antigen has reached a certain level of stability and has been used in the wild for around a couple of years. If you face any problems, please open an issue.

Antigen works with zsh versions >= 4.3.11.

Installation

Install Antigen from our main repository with the latest stable version available:

curl -L git.io/antigen > antigen.zsh
# or use git.io/antigen-nightly for the latest version

There are several installation methods using your System Package manager, just look at the Installation wiki page.

Now you may head towards the Commands and Configuration wiki pages to further understand Antigen's functionallity and customization.

Usage

The usage should be very familiar to you if you use Vundle. A typical .zshrc might look like this:

source /path-to-antigen/antigen.zsh

# Load the oh-my-zsh's library.
antigen use oh-my-zsh

# Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen bundle git
antigen bundle heroku
antigen bundle pip
antigen bundle lein
antigen bundle command-not-found

# Syntax highlighting bundle.
antigen bundle zsh-users/zsh-syntax-highlighting

# Load the theme.
antigen theme robbyrussell

# Tell Antigen that you're done.
antigen apply

Open your zsh with this .zshrc and you should see all the bundles you defined here, getting installed. Once it's done, you are ready to roll. The complete syntax for the antigen bundle command is discussed in the Commands page.

Furthermore, In the wild wiki section has more configuration examples. You may as well take a look at the Show off wiki page for interactive mode usage.

Meta

Motivation

If you use zsh and oh-my-zsh, you know that having many different plugins that are developed by many different authors in a single (sub)repo is not very easy to maintain. There are some really fantastic plugins and utilities in oh-my-zsh, but having them all in a single repo doesn't really scale well. And I admire robbyrussell's efforts for reviewing and merging the gigantic number of pull requests the project gets. We need a better way of plugin management.

This was discussed on a few issues, but it doesn't look like there was any progress made. So, I'm trying to start this off with Antigen, hoping to better this situation. Please note that I'm by no means a zsh or any shell script expert (far from it).

Inspired by vundle, Antigen can pull oh-my-zsh style plugins from various github repositories. You are not limited to use plugins from the oh-my-zsh repository only and you don't need to maintain your own fork and pull from upstream every now and then. I actually encourage you to grab plugins and scripts from various sources, straight from the authors, before they even submit it to oh-my-zsh as a pull request.

Antigen also lets you switch the prompt theme with one command, just like that

antigen theme candy

and your prompt is changed, just for this session of course (unless you put this line in your .zshrc).

Helping out

We are always looking for new contributors! We have a number of issues marked as "Help wanted" that are good places to jump in and get started. Take a look at our Roadmap to see future projects and discuss ideas.

Please be sure to check out our Contributing guidelines to understand our workflow, and our Coding conventions.

Feedback

Any comments/suggestions/feedback is truly welcome. Please say hello to us on Gitter. Or open an issue to discuss something (anything!) about the project ;).

Articles

There are many articles written by Antigen users out there. Be sure to check them out in the Articles page.

Plugins and Alternatives

The awesome-zsh-plugins list is a directory of plugins, themes and alternatives that you may find useful.

antigen's People

Contributors

belak avatar bolasblack avatar coreyjewett avatar czchen avatar desyncr avatar einselbst avatar feltnerm avatar gregoryhugaerts avatar guipsp avatar hlohm avatar iimog avatar jmatth avatar kalbasit avatar kamipo avatar knakayama avatar matthewfranglen avatar minimum2scp avatar paulmelnikow avatar rummik avatar sharat87 avatar shea690901 avatar sheerun avatar tarrasch avatar towo avatar twe4ked avatar unixorn avatar willghatch avatar wonmin82 avatar wrboyce avatar xgarrido avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

antigen's Issues

Problem - antigen-bundles <<EOF

Hi, thanks for solving the old problem!

I have another problem, when i try to

Example:
antige-lib

antigen-bundles <<EOF

git

EOF

Starting the shell I get this error.

zsh: can't open input file: /home/ivo/.zsh/custom/tools/check_for_upgrade.sh
/home/ivo/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh///oh-my-zsh.sh:14: no
matches found: /home/ivo/.zsh/custom/lib/*.zsh

$ antigen-list

https://github.com/robbyrussell/oh-my-zsh.git lib plugin
https://github.com/robbyrussell/oh-my-zsh.git plugins/git plugin
https://github.com/robbyrussell/oh-my-zsh.git / plugin # FIXME: Is problem to have /
https://github.com/zsh-users/zsh-completions.git / plugin
https://github.com/zsh-users/zsh-syntax-highlighting.git / plugin
https://github.com/zsh-users/zsh-history-substring-search.git / plugin
https://github.com/robbyrussell/oh-my-zsh.git themes/crunch.zsh-theme theme

And testing with $ cat .zshrc

antigen-lib

antigen-bundle git

Everything works fine

$ antigen-list
https://github.com/robbyrussell/oh-my-zsh.git lib plugin
https://github.com/robbyrussell/oh-my-zsh.git plugins/git plugin
https://github.com/zsh-users/zsh-completions.git / plugin
https://github.com/zsh-users/zsh-syntax-highlighting.git / plugin
https://github.com/zsh-users/zsh-history-substring-search.git / plugin
https://github.com/robbyrussell/oh-my-zsh.git themes/crunch.zsh-theme theme

NOTE:
I use default repo (robbyrussell's oh-my-zsh)

Thanks again!

tmux won't read zsh startup files when I have `antigen use prezto`

When I open up a (non-tmux) shell, and launch tmux from it, normally tmux will open and execute my shell startup files as normal. However, when I have antigen use prezto in my zshrc, when I launch tmux no startup files are executed. $SHELL brings me to this screen:

smackesey% $SHELL
This is the Z Shell configuration function for new users,
zsh-newuser-install.
You are seeing this message because you have no zsh startup files
(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory
~/.antigen/repos/). This function can help you with a few settings that should
make your use of the shell easier.

You can:

(q) Quit and do nothing. The function will be run again next time.

(0) Exit, creating the file ~/.antigen/repos//.zshrc containing just a comment.
That will prevent this function being run again.

(1) Continue to the main menu.

--- Type one of the keys in parentheses ---

Notice it's looking for startup files ~/.antigen/repos. I'm not sure whether I just don't understand something or this is a bug, but I didn't know where else to post. A temporary workaround is to symlink the startup files into ~/.antigen/repos.

Installing from non-oh-my-zsh repositories

Hi again. :)

I'd like to install some completions from https://github.com/zsh-users/zsh-completions. I guess I could just install them all, but I only want some of them, so I thought I could use antigen to install them. Maybe I'm wrong about that?

Here is what my .zshrc looks like:

    source ~/.zsh/antigen/antigen.zsh

    antigen-bundle heroku
    antigen-bundle brew
    antigen-bundle gem
    antigen-bundle zsh-users/zsh-completions.git bundle # one I care about and am not getting

    # Syntax highlighting bundle.
    antigen-bundle zsh-users/zsh-syntax-highlighting

    antigen-apply

All those install just fine, save for the zsh-users one. When I open a new tab I get this message:

    ls: /Users/<user>/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-completions/bundle: No such file or directory
    ls: /Users/<user>/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-completions/bundle: No such file or directory

Instead of bundle I've tried _bundle, /bundle, and _bundle. When I look in .antigen I don't see the bundle directory/symlink in the .antigen/bundles directory, though it does show up in the proper repository in .antigen/repos.

Is this a use case for antigen? If so, am I doing something wrong? Thanks in advance, and sorry keep hitting you with the issues. :)

$fpath completion folders not processed

I have no idea whether this is an antigen thing of not, but I'm out of ideas.

I'm loading this in my ~/.zshrc (symlinked to ~/.antigen/zshrc) after running antigen-apply:

fpath=( "${fpath[@]}" /usr/local/share/zsh-completions /usr/local/share/zsh/site-functions )

None of the /usr/local/share/zsh-completions completions are being loaded.

I do have an obscene amount of completers, but it should still work
%> echo $fpath | tr ' ' '\n'
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-arialdomartini-SLASH-oh-my-git.git//
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/git-remote-branch
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/ruby
/home/drat/.zsh-antigen/bundles/virtualenv
/home/drat/.zsh-antigen/bundles/stv
/home/drat/.zsh-antigen/bundles/git-completion
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-syntax-highlighting.git//
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-completions.git/src
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-history-substring-search.git//
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/vagrant
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/fabric
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/sprunge
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/vundle
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/tmux
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/history
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/command-not-found
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-kennethreitz-SLASH-autoenv.git//
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/bundler
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/rake
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/npm
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/node
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/python
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/rsync
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/pip
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/git
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/osx
/home/drat/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/lib
/usr/share/zsh/site-functions
/usr/share/zsh/5.0.2/functions
/usr/local/share/zsh-completions
/usr/local/share/zsh/site-functions

Regardless of whether I put /usr/local/share/zsh-completions first or last in the fpath= statement, they are ignored.

Is there anything to assist in tracking what's being loaded on shell startup?

history-substring-search plugin doesn't work

I'm talking about the oh-my-zsh history-substring-search plugin. Before I used antigen, I included the plugin in the usual oh-my-zsh plugins variable: plugins=(history-substring-search ...) and everything worked fine.

~ $ antigen-bundle history-substring-search
/Users/florian/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/history-substring-search/history-substring-search.plugin.zsh:source:3: no such file or directory: /plugins/history-substring-search/history-substring-search.zsh

~ $ ls .antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/history-substring-search
README                              history-substring-search.zsh
history-substring-search.plugin.zsh

Seems like the plugin is sourcing something wrong? But why did it work without using antigen?

Don't create a separate clone for local bundles

Currently, when a bundle is specified with an absolute path to a local git repo, it is cloned into $ADOTDIR/repos for loading it, just like any other bundle.

However, this clone step can be avoided. Antigen should load the bundle straight from the location of the local repo. This allows users to keep a local clone of their own plugin for development and have it loaded by antigen without the need to run antigen-update every time an experimental or debug change is made.

This feature should be optional and should be off by default. That is, unless specified, a separate clone should be created even for local repos.

Antigen quite broken with new autosuggest install mechanism

Couple of related issues all regarding the install script that antigen now relies on...

  • This issue on zsh-autosuggestions. Not really antigen's problem, but kind of is at the same time since your guys' installation relies on this.

    I worked around this by installing coreutils and changing it from readlink to greadlink (see this SO post)

  • Refer to lines 13-29 of that install script. It appends those 14 lines to ~/.zshrc every time the terminal opens.

The `*.plugin.zsh` pattern leads to non-DRY filenames

According to the readme it says that antigen looks for *.plugin.zsh files. My gut feeling (and somewhat experience) is that you'll end up in a file structure like this

my-antigen-plugins
├── syntax-highlight
│   └── syntax-highlight.plugin.zsh
└── zaw
    └── zaw.plugin.zsh

I personally would prefer

my-antigen-plugins
├── syntax-highlight
│   └── plugin.zsh
└── zaw
    └── plugin.zsh

The second is more dry and more concise, plus adopting that standard would not let ambiguity in determining which *.plugin.zsh file should be loaded if there were many.

I know that you can "fake this" by knowing that you can have only one .zsh file and let that be named plugin.zsh but it feels so much like a hack then. Alternatively one can set the standard to *plugin.zsh, that is both zaw.plugin.zsh and plugin.zsh will work, but I personally would prefer a strict plugin.zsh pattern, allowing only the file to be named plugin.zsh.

So, have anyone else thought about this, any opinions? Sorry for bikeshedding this but I think it's worth considering this while antigen is in beta. Or probably the author have already thought about this but haven't documented the reaso n that the *.plugin.zsh pattern is better.

dirname invalid option

Hello,
I've been using oh-my-zsh for a while, but after a reinstall it started giving errors. So I decided to give antigen a try.

# $HOME/.zshrc
source $HOME/src/dotfiles/antigen/antigen.zsh
# Load oh-my-zsh library
antigen use oh-my-zsh

# Bundles from the default repo (oh-my-zsh)
antigen bundle git
antigen bundle command-not-found

# Python
antigen bundle pip
antigen bundle python
antigen bundle virtualenv
antigen bundle ssh-agent

# Load theme
antigen theme gallifrey

# Syntax highlighting bundle
antigen bundle zsh-users/zsh-syntax-highlighting

# Tell antigen we're done
antigen apply
# Arch Linux
Linux gaia 3.17.2-1-ARCH #1 SMP PREEMPT Thu Oct 30 20:49:39 CET 2014 x86_64 GNU/Linux

When I run it normal, it doesn't complain, but when I want to run tmux I get the following;

tmux
It complains about the following line;

local _ANTIGEN_INSTALL_DIR="$(cd "$(dirname "$0")" && pwd)"

After which it runs, but with errors. Is the due to my config or some other reason? I could use some help on this.

antigen theme not working

if run antigen theme apple by hand in terminal , it's work. but not working in .zshrc file

zsh 5.0.5 (x86_64-apple-darwin13.0.0)

'selfupdate' failed even antigen is installed using git clone

»  zsh --version                                                          
zsh 5.0.5 (i686-pc-linux-gnu)
-----
» zsh --version                                                             
zsh 5.0.5 (x86_64-apple-darwin14.0)

I installed antigen using git clone. When running the antigen selfupdate command, it gives this error

Your copy of antigen doesn't appear to be a git clone. 
The 'selfupdate' command cannot work in this case.

conflict with Bundler (ruby)

Hi,
This is a really cool plugin manager---just what I was looking for to try zsh again. So thanks.

One problem for those of us that use Ruby: bundle is already a command we have to run a lot. It's the executable for Bundler. So to set up a project, etc. you run bundle install. This doesn't conflict with your bundle-install, thankfully, but it does with the specification of which bundles you want via bundle <plugin name>.

Any chance this could be changed to something else (like bundle-name <plugin name> or even antigen <plugin name>)?

Thanks again for a really cool plugin manager.

antigen clean is unnecessary removing already loaded version

I was testing antigen. Following are my output from terminal

apatel@Amits-MacBook-Pro ~ % source ~/.zsh/antigen.zsh
apatel@Amits-MacBook-Pro ~ % antigen-bundle zsh-users/zsh-syntax-highlighting
Cloning into '/Users/apatel/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-syntax-highlighting.git'...
remote: Counting objects: 673, done.
remote: Compressing objects: 100% (317/317), done.
remote: Total 673 (delta 385), reused 630 (delta 345)
Receiving objects: 100% (673/673), 101.12 KiB | 145 KiB/s, done.
Resolving deltas: 100% (385/385), done.
apatel@Amits-MacBook-Pro ~ % antigen list
https://github.com/zsh-users/zsh-syntax-highlighting.git / plugin true
apatel@Amits-MacBook-Pro ~ % antigen cleanup
You have clones for the following repos, but are not used.
https://github.com/zsh-users/zsh-syntax-highlighting.git/

Delete them all? [y/N] y

Deleting clone for https://github.com/zsh-users/zsh-syntax-highlighting.git/... done.

It shouldn't get deleted since antigen-list is clearly listing it as loaded.

oh-my-zsh last-working-dir seems to be broken

My ~/.zshrc

source "$HOME/.antigen/antigen.zsh"

antigen use oh-my-zsh

antigen bundle git
antigen bundle last-working-dir

antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-history-substring-search

antigen theme robbyrussell

antigen apply

Output

➜  ~  cd Dropbox 
chpwd:2: no such file or directory: 

Starting zsh with antigen is really slow

My shells sometimes take longer than 10 seconds to start. I'm not really sure where to start fixing that. I'm also not sure how much of that is Antigen and how much is OMZsh.

Do others have the same problem?

Clones two copies of the same repo for some plugins

When I run the latest Antigen, I get the following output:

♬  reload
cd ~/.dots && git pull origin master
From github.com:tubbo/dots
 * branch            master     -> FETCH_HEAD
Already up-to-date.
cd /Users/tom/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-kennethreitz-SLASH-autoenv && git pull origin master
From https://github.com/kennethreitz/autoenv
 * branch            master     -> FETCH_HEAD
Already up-to-date.
cd /Users/tom/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-kennethreitz-SLASH-autoenv.git && git pull origin master
From https://github.com/kennethreitz/autoenv
 * branch            master     -> FETCH_HEAD
Already up-to-date.
cd /Users/tom/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh && git pull origin master
From https://github.com/robbyrussell/oh-my-zsh
 * branch            master     -> FETCH_HEAD
Already up-to-date.
cd /Users/tom/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git && git pull origin master
From https://github.com/robbyrussell/oh-my-zsh
 * branch            master     -> FETCH_HEAD
Already up-to-date.

Why is each repo being cloned twice?

Here's what my Antigen bundle file looks like (it's being loaded by reload):

# Load the plugin architecture
source "$ZSH/vendor/antigen/antigen.zsh"

# Set up the plugin architecture
antigen-lib

# Bare Oh My ZSH plugins
antigen-bundle cap

# Local modifications to OMZ plugins
antigen-bundle $HOME/.dots/lib/plugins/aws
antigen-bundle $HOME/.dots/lib/plugins/bundler
antigen-bundle $HOME/.dots/lib/plugins/git
antigen-bundle $HOME/.dots/lib/plugins/git-process
antigen-bundle $HOME/.dots/lib/plugins/knife
antigen-bundle $HOME/.dots/lib/plugins/macvim
antigen-bundle $HOME/.dots/lib/plugins/osx
antigen-bundle $HOME/.dots/lib/plugins/rails3
antigen-bundle $HOME/.dots/lib/plugins/ruby

# From alternative sources
antigen-bundle zsh-users/zsh-syntax-highlighting
antigen-bundle kennethreitz/autoenv

# Apply loaded plugins to the environment
antigen-apply

Migrating zshrc to using antigen

Hi there,

By Shrikant Sharat I was advised to open an issue for my question. I discovered antigen and want to move my zshrc completely to using antigen.

I followed several introductions and now my zshrc looks as follows:

~ cat .zshrc
# Configuration largely inspired by
# http://danryan.co/using-antigen-for-zsh.html
[ -e "${HOME}/.zsh_aliases" ] && source "${HOME}/.zsh_aliases"
export PATH=$HOME/bin:/usr/local/bin:$PATH

source /usr/share/zsh/scripts/antigen/antigen.zsh 

antigen use oh-my-zsh

# bundles from oh-my-zsh
antigen bundle git
antigen bundle rupa/z
antigen bundle zsh-users/zsh-syntax-highlighting

antigen-theme zhann
antigen-apply

# keybindings
# https://wiki.archlinux.org/index.php/Zsh#Key_bindings
# create a zkbd compatible hash;
# to add other keys to this hash, see: man 5 terminfo
typeset -A key

key[Home]=${terminfo[khome]}

key[End]=${terminfo[kend]}
key[Insert]=${terminfo[kich1]}
key[Delete]=${terminfo[kdch1]}
key[Up]=${terminfo[kcuu1]}
key[Down]=${terminfo[kcud1]}
key[Left]=${terminfo[kcub1]}
key[Right]=${terminfo[kcuf1]}
key[PageUp]=${terminfo[kpp]}
key[PageDown]=${terminfo[knp]}

# setup key accordingly
[[ -n "${key[Home]}"     ]]  && bindkey  "${key[Home]}"     beginning-of-line
[[ -n "${key[End]}"      ]]  && bindkey  "${key[End]}"      end-of-line
[[ -n "${key[Insert]}"   ]]  && bindkey  "${key[Insert]}"   overwrite-mode
[[ -n "${key[Delete]}"   ]]  && bindkey  "${key[Delete]}"   delete-char
[[ -n "${key[Up]}"       ]]  && bindkey  "${key[Up]}"       up-line-or-history
[[ -n "${key[Down]}"     ]]  && bindkey  "${key[Down]}"     down-line-or-history
[[ -n "${key[Left]}"     ]]  && bindkey  "${key[Left]}"     backward-char
[[ -n "${key[Right]}"    ]]  && bindkey  "${key[Right]}"    forward-char
[[ -n "${key[PageUp]}"   ]]  && bindkey  "${key[PageUp]}"   beginning-of-buffer-or-history
[[ -n "${key[PageDown]}" ]]  && bindkey  "${key[PageDown]}" end-of-buffer-or-history

# Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid.
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
    function zle-line-init () {
        printf '%s' "${terminfo[smkx]}"
    }
    function zle-line-finish () {
        printf '%s' "${terminfo[rmkx]}"
    }
    zle -N zle-line-init
    zle -N zle-line-finish
fi

# Zsh rehash automatically
# Tab completion after installation/removal
# http://www.ephexeve.com/2012/10/zsh-rehash-automatically.html
# TRAPUSR1() { rehash}; precmd() { [[ $history[$[ HISTCMD -1 ]] == *(pacman|yaourt)* ]] && killall -USR1 zsh }
# https://bbs.archlinux.org/viewtopic.php?pid=1369287#p1369287
zstyle ':completion:*' rehash true

# Zsh: Smart autocompletion feature?
# http://stackoverflow.com/questions/23404412/zsh-smart-autocompletion-feature
zstyle ':completion:*' matcher-list 'l:|=* r:|=*'

# Search history up and down arrows
# http://superuser.com/questions/585003/searching-through-history-with-up-and-down-arrow-in-zsh
bindkey '^[[A' up-line-or-search
bindkey '^[[B' down-line-or-search

As you can see, the whole bunch of code lines starting with the keybindings is bloating up my zshrc.

Thus, I am wondering, can this be simplified when using antigen?

Are there any plugins available that provide the same functionality to polish my zshrc?

Thanks a lot for your advice!

antigen commands do not work outside of zshrc

Inside my .zshrc antigen works, i.e., all bundles are installed and loaded properly. If I run antigen-list immediately after antigen-apply in my .zshrc all my bundles are listed. However, if I run antigen-list from my shell it outputs You don't have any bundles.

Here is the relevant part of my .zshrc:

source $HOME/.dotfiles/zsh/antigen/antigen.zsh
antigen-lib
antigen-bundle vi-mode
antigen-bundle zsh-users/zsh-syntax-highlighting
antigen-bundle zsh-users/zsh-history-substring-search
antigen-theme blinks
antigen-apply

I'd be happy to supply more info but at this point I don't know what else would be needed. Thanks in advance.

Unknown argument 'loc'.

On Mac OS X Yosemite I get:

% zsh --version
zsh 5.0.5 (x86_64-apple-darwin14.0)
% env | grep ANTI 
ANTIGEN_DEFAULT_REPO_URL=https://github.com/robbyrussell/oh-my-zsh.git
% antigen use oh-my-zsh
Unknown argument 'loc'.
% antigen theme robbyrussell
Unknown argument 'loc'.

All other antigen command seems to work fine. I suspect that the problem with these commands is what is causing my theme to look different from my previous use of oh-my-zsh, and also the cursor is sometimes misplaced.

I did some quick debugging and it seems like this is the line that causes the Unknown argument:

    eval "$(-antigen-parse-args \
            'url?, loc? ; branch:?, no-local-clone?, btype:?' \
            "$@")"

I've not been digging deeper into the antigen-parse-args() function yet. I would appreciate any help with this. Thanks!

Better messages for -update command

Some commands like -update give output that isn't very readable. To make sense of the output and figure out which plugins have had changes pulled in, isn't a trivial task.

This command needs better messages indication what plugins have been updated and, optionally, a change log with the commit messages of the newly pulled changes.

Running the tests

When I run the tests using either make or make tests, I get

cram: error: no such option: --shell

And cram --help doesn't even have the --shell option, nor should it according to its self-documenting tests. Are you relying on some old or non-official version of cram?.

So it would be nice if the tests could be run with the current version of cram (at least I think I run that) or that you could mention what mistake I've done in the readme. :)

Call for help

As you all might have noticed, there are long awaiting issues and pull requests that need to be dealt with. I am sorry I could't respond quickly enough, but it has been hard for me to find the time. I hoped I'd find the time for this project, but could not. So, instead of keeping it in the dark, I'm putting this message out.

Any contributors interested in taking this project forward can join in the zsh-users group and start moving it. I think being in the group gives you write permission to the repo. If someone is up for becoming the new maintainer, we can discuss that out too.

I love this project. I thank everyone for showing your love and spreading the word. I can't thank enough those who've reported issues and submitted PR's and bore with me to make antigen even better.

This isn't a good bye. This is a call for a helping hand. Thank you.

How to install powerline using antigen?

I'm trying to install Lokaltog/powerline with antigen, but it's not working. I'm trying to do it the following two ways, but either way gives me a "zsh: command not found: powerline` error:

    antigen bundle Lokaltog/powerline
        . $HOME/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-Lokaltog-SLASH-powerline.git/powerline/bindings/zsh/powerline.zsh

or

    antigen bundle Lokaltog/powerline powerline/bindings/zsh

Am I missing something? Thanks!

completion for file args doesn't happen if I use `antigen apply`

I'm using antigen bundles to list a set of bundles, then I was calling antigen apply afterwards.

Not sure this is required since bundles still seem to load if I remove that call. And oddly enough it also makes completion for file name arguments work again.

To clarify, with this setup, I can tab-complete local file paths:

source "$HOME/.antigen/antigen/antigen.zsh"

antigen bundles <<EOBUNDLES
  zsh-users/zsh-syntax-highlighting

  sindresorhus/pure

  matschaffer/zsh-matschaffer
EOBUNDLES

But if I add the apply step, I can't tab-complete local file paths:

source "$HOME/.antigen/antigen/antigen.zsh"

antigen bundles <<EOBUNDLES
  zsh-users/zsh-syntax-highlighting

  sindresorhus/pure

  matschaffer/zsh-matschaffer
EOBUNDLES

antigen apply

Is this expected?

Seems like `antigen-cleanup` doesn't work properly

First of all, this command shows that all my plugins' repos are "not used". When it tries to compare list of included plugins via -antigen-echo-record and list of directories under $ADOTDIR/repos it fails because -antigen-get-clone-url can't recognize branches properly.

The second problem is: antigen-cleanup reports "done" after trying to remove corresponding folder even if it was not removed (and even if it isn't exists). Also, when it calls rm -rf "$(-antigen-get-clone-dir $url)" it is fails too because after adding support for branches into antigen -antigen-get-clone-dir accepts mandatory second argument (branch name or just - if no branch specified). But here we pass only one argument - and -antigen-get-clone-dir adds trailing -PIPE- to the directory name.

Using themes from gists needs more sugar and better errors overall

Antigen tries to load it as a regular GitHub repo using the basic syntax (using smileart/3750104 as an example):

$ antigen theme smileart/3750104
Cloning into '/Users/acook/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-smileart-SLASH-3750104.git'...
Username for 'https://github.com':
Password for 'https://github.com':
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/smileart/3750104.git/'
-antigen-load:source:19: no such file or directory: /Users/acook/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-smileart-SLASH-3750104.git//.zsh-theme

This doesn't work either:

$ antigen theme [email protected]:3750104.git
-antigen-load:source:19: no such file or directory: /Users/acook/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/themes/[email protected]:3750104.git.zsh-theme

Nor this:

antigen bundle [email protected]:3750104.git
ls: /Users/acook/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/[email protected]:3750104.git: No such file or directory
ls: /Users/acook/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/[email protected]:3750104.git: No such file or directory
ls: /Users/acook/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/[email protected]:3750104.git: No such file or directory

I can clone it manually:

$ git clone [email protected]:3750104.git
Cloning into '3750104'...
remote: Counting objects: 34, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 34 (delta 9), reused 19 (delta 4)
Receiving objects: 100% (34/34), 40.52 KiB | 0 bytes/s, done.
Resolving deltas: 100% (9/9), done.
Checking connectivity... done

And I finally got it to work with Antigen by doing this:

$ antigen bundle https://gist.github.com/3750104.git --btype=theme --loc=agnoster
Cloning into '/Users/acook/.antigen/repos/https-COLON--SLASH--SLASH-gist.github.com-SLASH-3750104.git'...
remote: Counting objects: 34, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 34 (delta 9), reused 19 (delta 4)
Unpacking objects: 100% (34/34), done.
Checking connectivity... done

Is there an easier way? I had to dig through the source code to even come up with the final implementation I used.

antigen is broken (on mac) after commit 973558e

I've noticed that BSD's sed does not have the option "-r". However, just replacing "-r" with "-E" does not fix the problem, I still get this:

Unknown argument 'loc'.
(eval):1: https not found
zsh: can't open input file: /tools/check_for_upgrade.sh
/Users/estk/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git///oh-my-zsh.sh:14: no matches found: /lib/*.zsh
(eval):1: https not found
(eval):1: https not found
(eval):1: https not found
(eval):1: https not found
(eval):1: https not found
(eval):1: https not found
(eval):1: https not found
(eval):1: https not found
(eval):1: https not found
Unknown argument 'loc'.
(eval):1: https not found
zsh: can't open input file: /tools/check_for_upgrade.sh
/Users/estk/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git///oh-my-zsh.sh:14: no matches found: /lib/*.zsh

Thanks
~e

A migrate-from-ohmyzsh command

Running such a command should detect the specific fork of oh-my-zsh being used and which plugins and theme are active and generate an appropriate .zshrc file with the corresponding antigen-* commands that will have the same effect. This should make it easier for people to move over from oh-my-zsh to antigen.

Random theme

Hello,
I'm beginning to use antigen and it's so nice to bring some portable sanity to oh-my-zsh and company. After trying some things and looking at the source code, it looks like it's no longer possible to get a random theme on each terminal start. This functionality may be out of the desired scope for Antigen, so I'd like to get a feel whether I should take the time to put together a pull request for it? Also to note, the OMZ's random theme functionality may be changing soon - per ohmyzsh/ohmyzsh#2902
Thoughts?

Documentation should recommend one single way to structure plugin

Basically I would prefer if antigen told the user how to setup their plugin so antigen will load it, rather than it mentioning the 100 different ways it supports. That is because as a plugin author, I just expect a one line explanation like: "Antigen will load any file in following the *.plugin.zsh format, it's behavior is undefined if multiple such file exists". I believe that the current docs is too long and slack.

Please also see issue #23, where we actually discuss which pattern should be the recommended one if any. Here we discuss if there should be a recommended pattern at all or not.

Rewrite?

I'm planning on a total rewrite of antigen based off of the current codebase tonight (8 hour hackathon). I've already fixed some bugs in it (brittle code loading, that depends on OhMyZSH's setopts).

I plan to rewrite as close to the original code as I can, just less brittle (depending on extended_glob without setting it is an example of the bad pratices I found).

Any thoughts?

/cc @sharat87

Add repos to .gitignore

Could we add repos to gitignore? I use antigen as a submodule and it doesn't make sense for the repo to be considered 'dirty' when I fetch other repos.

Ability to create a snapshot of current plugin versions and be able to restore from such a snapshot

I propose an antigen-snapshot and antigen-restore (names not final) as described below.

antigen-snapshot — Create a snapshot file with all the information required to be able to restore all plugins, theme and whatever else, exactly at the versions they are.

antigen-restore — Given a snapshot file created by antigen-snapshot, it will restore the plugins and theme exactly as they were when the snapshot was taken.

The snapshot file could be used to reproduce your exact setup on a different machine. Currently, there is no sane way to do this.

You could put a snapshot file that you know works well, in a git repo or in a gist perhaps.

Still brainstorming on this one. What do you guys think?

No way to change .zcompdump file location

Man page of zsh is saying the dumped file name can be given by 'compinit -d dumpfile'.

But, since antigen-apply() do following things,

autoload -U compinit
compinit -i

There is no way to change .zcompdump file location while using antigen.

AntiGen Themes not working

installed AntiGen via ArchLinuxs AUR and via Github here, everything works fine exept the Themes, AntiGen just doesnt care, it downloads the Theme, but nothing visible changes, even after opening a new Session, tried over SSH and Local Console
image

EDIT: The Bundles are working, and nothing should modify the PS1 Var, fresh ZSH 5.0.7 installation on ArchLinux

What is cram?

The readme mentions of a test framework named cram, but the hyper link just points to this repository. Have I missed something or is the test framework inside this repository or something?

Release tags?

Are there any plans to publish a stable release? I'd like to provide antigen as a Debian package so people can easily install it and a release or a tag would make packaging a lot easier.

antigen-bundle and antigen-update creates 2 different repository

If i dont specify a branch name and run antigen-bundle and antigen-update it creates 2 separate repository. essentially update will never applied.

following is my command line output. when we ran update command some how there is an extra character which gets passed branch name conditions.

➜ repos antigen-bundle zsh-users/zsh-syntax-highlighting
Cloning into '/Users/apatel/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-syntax-highlighting'...
remote: Counting objects: 673, done.
remote: Compressing objects: 100% (317/317), done.
remote: Total 673 (delta 385), reused 630 (delta 345)
Receiving objects: 100% (673/673), 101.12 KiB, done.
Resolving deltas: 100% (385/385), done.
zsh: command not found: git_prompt_info
➜ repos antigen-update
Cloning into '/Users/apatel/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-syntax-highlighting.git-PIPE-'...
remote: Counting objects: 673, done.
remote: Compressing objects: 100% (317/317), done.
remote: Total 673 (delta 385), reused 630 (delta 345)
Receiving objects: 100% (673/673), 101.12 KiB, done.
Resolving deltas: 100% (385/385), done.
zsh: command not found: git_prompt_info

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.