Prerequisite

  • zsh
  • antigen

Config

.zshrc:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
### Load antigen

# Github
# source ~/antigen.zsh

# Manjaro
# source /usr/share/zsh/share/antigen.zsh

# OpenSUSE build service (include Fedora)
# source /usr/share/antigen.zsh

# Debian
# source /usr/share/zsh-antigen/antigen.zsh

# Homebrew
source $(brew --prefix)/share/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
antigen bundle docker
antigen bundle docker-compose
antigen bundle vi-mode

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

# Load the theme.
antigen theme https://github.com/caiogondim/bullet-train-oh-my-zsh-theme bullet-train

# Alias
# alias alias_name = <command>

# Ranger configs
## Quit ranger and keep the working directory
function ranger_func {
ranger $*
local quit_cd_wd_file="$HOME/.ranger_quit_cd_wd"
if [ -s "$quit_cd_wd_file" ]; then
cd "$(cat $quit_cd_wd_file)"
true > "$quit_cd_wd_file"
fi
}

alias rn='ranger_func'

# Tell Antigen that you're done.
antigen apply

Post-installation

1
source ~/.zshrc