Use zplug for modules
This commit is contained in:
parent
3b08d40ccd
commit
c6a44a6bab
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -1,6 +0,0 @@
|
|||||||
[submodule "zsh-syntax-highlighting"]
|
|
||||||
path = zsh-syntax-highlighting
|
|
||||||
url = https://github.com/zsh-users/zsh-syntax-highlighting
|
|
||||||
[submodule "fzf"]
|
|
||||||
path = fzf
|
|
||||||
url = https://github.com/junegunn/fzf
|
|
||||||
@ -3,8 +3,8 @@
|
|||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Clone this directory as `$HOME/.zsh`.
|
1. Clone this directory as `$HOME/.zsh`.
|
||||||
2. Do `git submodule init` and `git submodule update` in this directory.
|
2. Install `zplug`, preferably from distribution repository, if not, [as described on github](https://github.com/zplug/zplug).
|
||||||
3. Put following code in `$HOME/.zshrc:
|
3. Put following code in `$HOME/.zshrc`:
|
||||||
```
|
```
|
||||||
source $HOME/.zsh/zshrc
|
source $HOME/.zsh/zshrc
|
||||||
```
|
```
|
||||||
|
|||||||
1
fzf
1
fzf
@ -1 +0,0 @@
|
|||||||
Subproject commit 6654239c94667fefb38d76cfc47b6abf5ced8149
|
|
||||||
@ -1 +0,0 @@
|
|||||||
Subproject commit a33c72e8389b3d984d25fd556d86878777c76571
|
|
||||||
34
zshrc
34
zshrc
@ -640,17 +640,6 @@ for command in find wget git; \
|
|||||||
# load zsh extended move
|
# load zsh extended move
|
||||||
autoload -Uz zmv
|
autoload -Uz zmv
|
||||||
|
|
||||||
#---------------------------------- Addons ------------------------------------
|
|
||||||
|
|
||||||
if [[ -d ${ZDOTDIR:-$HOME}/.zsh/zsh-syntax-highlighting ]]; then
|
|
||||||
source ${ZDOTDIR:-$HOME}/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
||||||
fi
|
|
||||||
if command-exists fzf && [[ -d ${ZDOTDIR:-$HOME}/.zsh/fzf ]]; then
|
|
||||||
source ${ZDOTDIR:-$HOME}/.zsh/fzf/shell/completion.zsh
|
|
||||||
source ${ZDOTDIR:-$HOME}/.zsh/fzf/shell/key-bindings.zsh
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------- Machine specific --------------------------
|
#---------------------------------- Machine specific --------------------------
|
||||||
|
|
||||||
if [[ -r $HOME/.zlocal ]]; then
|
if [[ -r $HOME/.zlocal ]]; then
|
||||||
@ -681,3 +670,26 @@ if [[ $commands[kubectl] ]]; then
|
|||||||
source <(kubectl completion zsh);
|
source <(kubectl completion zsh);
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------- Addons ------------------------------------
|
||||||
|
|
||||||
|
if [[ -f '/usr/share/zplug/init.zsh' ]]; then
|
||||||
|
source /usr/share/zplug/init.zsh
|
||||||
|
zplug "plugins/git", from:oh-my-zsh
|
||||||
|
zplug "plugins/sudo", from:oh-my-zsh
|
||||||
|
zplug "plugins/command-not-found", from:oh-my-zsh
|
||||||
|
zplug "zsh-users/zsh-syntax-highlighting"
|
||||||
|
zplug "zsh-users/zsh-autosuggestions"
|
||||||
|
zplug "zsh-users/zsh-history-substring-search"
|
||||||
|
zplug "zsh-users/zsh-completions"
|
||||||
|
zplug "junegunn/fzf"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! zplug check --verbose; then
|
||||||
|
printf "Install? [y/N]: "
|
||||||
|
if read -q; then
|
||||||
|
echo; zplug install
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
zplug load
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user