-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspaceship-config.zsh
65 lines (59 loc) · 1.98 KB
/
spaceship-config.zsh
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
SPACESHIP_CHAR_SYMBOL=' '
SPACESHIP_CHAR_SUFFIX=' '
SPACESHIP_JOBS_SYMBOL='鈴'
SPACESHIP_JOBS_AMOUNT_THRESHOLD=0 # Show job amount when it's > 0
SPACESHIP_EXIT_CODE_SHOW=true
SPACESHIP_EXIT_CODE_SYMBOL='✘ '
SPACESHIP_GIT_STATUS_PREFIX=" [ "
# Left prompt sections
SPACESHIP_PROMPT_ORDER=(
user # Username section
dir # Current directory section
host # Hostname section
git_stat # Git statistic
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
toolbox # Fedora toolbox
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
vi_mode # Vi-mode indicator
char # Prompt character
)
# Right prompt sections
SPACESHIP_RPROMPT_ORDER=(
jobs # Background jobs indicator
exit_code # Exit code section
)
# Source custom section
CUSTOM_SECTION_DIR="$HOME/.zshrc.d/spaceship.d"
for section in $(spaceship::union $SPACESHIP_PROMPT_ORDER $SPACESHIP_RPROMPT_ORDER); do
if [[ -f "$CUSTOM_SECTION_DIR/$section.zsh" ]]; then
source "$CUSTOM_SECTION_DIR/$section.zsh"
elif spaceship::defined "spaceship_$section"; then
# section is declared
continue
else
echo "Section '$section' was not loaded"
fi
done