「zplug」の版間の差分
提供: FreeBSD入門
(相違点なし)
|
2015年12月25日 (金) 16:44時点における版
zplug は、次世代のzsh プラグインマネージャーです。
読み方
- zplug
- ぜっと ぷらぐ
概要
zplug は、次世代の zsh プラグインマネージャーです。
- あらゆるものを管理できます。
- GitHub や Bitbucket 上の zsh プラグイン / Unix コマンド
- Gist ファイル (gist.github.com)
- 永続的なプラグイン管理 (例 oh-my-zsh プラグイン)
- バイナリアーティファクト on GitHub Releases
- など
- 非常に高速な並列インストールとアップデート
- ブランチ・タグ・コミットのサポート
- Post update hooks
- プラグイン間の依存を理解します。
- antigen とは異なり、 zsh プラグインファイル (*.plugin.zsh) を必要としません。
- インタラクティブなインタフェース(fzf, peco, zaw といったもの)
インストール
zplug をダウンロードして、 ~/.zplug に置きます。
curl -fLo ~/.zplug/zplug --create-dirs https://git.io/zplug
設定
source ~/.zplug/zplug # Make sure you use double quotes zplug "zsh-users/zsh-syntax-highlighting" zplug "zsh-users/zsh-history-substring-search" # Can manage a plugin as a command # And accept glob patterns (e.g., brace, wildcard, ...) zplug "Jxck/dotfiles", as:command, of:"bin/{histuniq,color}" # Can manage everything e.g., other person's zshrc zplug "tcnksm/docker-alias", of:zshrc # Prohibit updates to a plugin by using the "frozen:" tag zplug "k4rthik/git-cal", as:command, frozen:1 # Grab binaries from GitHub Releases # and rename to use "file:" tag zplug "junegunn/fzf-bin", \ as:command, \ from:gh-r, \ file:fzf # Support oh-my-zsh plugins and the like zplug "plugins/git", from:oh-my-zsh zplug "themes/duellj", from:oh-my-zsh zplug "lib/clipboard", from:oh-my-zsh # Run a command after a plugin is installed/updated zplug "tj/n", do:"make install" # Support checking out a specific branch/tag/commit of a plugin zplug "b4b4r07/enhancd", at:v1 zplug "mollifier/anyframe", commit:4c23cb60 # Install if "if:" tag returns true zplug "hchbaw/opp.zsh", if:"(( ${ZSH_VERSION%%.*} < 5 ))" # Can manage gist file just like other plugins zplug "b4b4r07/79ee61f7c140c63d2786", \ from:gist, \ as:command, \ of:get_last_pane_path.sh # Support bitbucket zplug "b4b4r07/hello_bitbucket", \ as:command from:bitbucket, \ do:"chmod 755 *.sh", \ of:"*.sh" # Group dependencies, emoji-cli depends on jq in this example zplug "stedolan/jq", \ as:command, \ file:jq, \ from:gh-r \ | zplug "b4b4r07/emoji-cli" # Install plugins if there are plugins that have not been installed if ! zplug check --verbose; then printf "Install? [y/N]: " if read -q; then echo; zplug install fi fi # Then, source plugins and add commands to $PATH zplug load --verbose
使い方
まずはじめに
zplugをダウンロードし、.zshrc に設定をした状態で、zsh を起動すると、インストールするか聞かれます。
% zsh /home/user/.zshrc:47: command not found: from:bitbucket, - zsh-users/zsh-syntax-highlighting: not installed - zsh-users/zsh-history-substring-search: not installed - tj/n: not installed - themes/duellj: not installed - tcnksm/docker-alias: not installed - plugins/git: not installed - mollifier/anyframe: not installed - lib/clipboard: not installed - k4rthik/git-cal: not installed - junegunn/fzf-bin: not installed - hchbaw/opp.zsh: not installed - b4b4r07/hello_bitbucket: not installed - b4b4r07/enhancd: not installed - b4b4r07/emoji-cli: not installed - b4b4r07/79ee61f7c140c63d2786: not installed - Jxck/dotfiles: not installed Install? [y/N]:
なにやら途中で失敗しているのがありますが、インストールされました。
Install? [y/N]: y Installing... b4b4r07/hello_bitbucket Installing... b4b4r07/emoji-cli Installing... tj/n Installing... robbyrussell/oh-my-zsh Installing... junegunn/fzf-bin Installing... zsh-users/zsh-syntax-highlighting Installing... b4b4r07/enhancd Installing... zsh-users/zsh-history-substring-search Installing... tcnksm/docker-alias Installing... k4rthik/git-cal Installing... b4b4r07/79ee61f7c140c63d2786 Installing... mollifier/anyframe Installing... hchbaw/opp.zsh Installing... Jxck/dotfiles / Not Installed b4b4r07/hello_bitbucket (1.97s) mkdir -p /usr/local/ cp /usr/local/ usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... target_directory *** Error code 64 Stop. make: stopped in /usr/home/user/.zplug/repos/tj/n Installed! b4b4r07/emoji-cli (2.01s) Installed! tj/n (2.00s) Installed! b4b4r07/79ee61f7c140c63d2786 (2.32s) Installed! tcnksm/docker-alias (2.38s) Installed! zsh-users/zsh-history-substring-search (2.41s) Installed! b4b4r07/enhancd (2.42s) Installed! hchbaw/opp.zsh (2.39s) Installed! mollifier/anyframe (2.40s) Installed! junegunn/fzf-bin (2.51s) Installed! zsh-users/zsh-syntax-highlighting (2.53s) Installed! k4rthik/git-cal (2.53s) Installed! robbyrussell/oh-my-zsh (5.13s) Installed! Jxck/dotfiles (11.78s) ==> Installed to /home/user/.zplug/repos but failed. zplug: total wall-time 11.896262 sec. Static loading...