forked from Lattyware/zsh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig
97 lines (84 loc) · 2.75 KB
/
config
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
CONFIG_PATH="${XDG_CONFIG_HOME:-${HOME}/.config}/zsh"
# Set a large history file.
HISTFILE=${CONFIG_PATH}/history
HISTSIZE=100000
SAVEHIST=100000
setopt INC_APPEND_HISTORY
# Allow extended globbing.
setopt extendedglob nomatch
# Set Emacs style keys.
bindkey -e
# Ctrl+Left/Right to navigate words.
bindkey -- "^[[1;5D" backward-word
bindkey -- "^[[1;5C" forward-word
# Prompt theming.
fpath=("${CONFIG_PATH}/fpath" "$fpath[@]")
autoload -Uz promptinit
promptinit
SPACESHIP_TIME_SHOW=true
SPACESHIP_KUBECTL_SHOW=true
SPACESHIP_EXIT_CODE_SHOW=true
SPACESHIP_PROMPT_ORDER=(
user # Username section
dir # Current directory section
host # Hostname section
git # Git section (git_branch + git_status)
hg # Mercurial section (hg_branch + hg_status)
package # Package version
node # Node.js section
ruby # Ruby section
elixir # Elixir section
xcode # Xcode section
swift # Swift section
golang # Go section
php # PHP section
rust # Rust section
haskell # Haskell Stack section
julia # Julia section
docker # Docker section
aws # Amazon Web Services section
gcloud # Google Cloud Platform section
venv # virtualenv section
conda # conda virtualenv section
pyenv # Pyenv section
dotnet # .NET section
ember # Ember.js section
kubectl # Kubectl context section
terraform # Terraform workspace section
exec_time # Execution time
line_sep # Line break
battery # Battery level and status
vi_mode # Vi-mode indicator
jobs # Background jobs indicator
exit_code # Exit code section
char # Prompt character
)
SPACESHIP_RPROMPT_ORDER=(
time
)
prompt spaceship
# Completion.
zstyle ':completion:*' menu select
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'l:|=* r:|=*'
zstyle ':completion::complete:*' gain-privileges 1
setopt COMPLETE_ALIASES
autoload -Uz compinit
compinit
# Add slashes when autocompleting directories.
setopt AUTO_PARAM_SLASH
unsetopt AUTO_REMOVE_SLASH
# History searching.
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search
[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search
# Set up system path.
typeset -U PATH path # Discard duplicates.
path=("$path[@]")
export PATH
# Add exports
source ${CONFIG_PATH}/exports
# Add aliases
source ${CONFIG_PATH}/aliases