-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsimple.zsh-theme
32 lines (24 loc) · 1.11 KB
/
simple.zsh-theme
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
# Zsh prompt
#
# Based on tjkirch (https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/tjkirch.zsh-theme)
# Username hiding from agnoster (https://gist.github.com/agnoster/3712874)
# Git status based on https://gist.github.com/joshdick/4415470
# -- Shows number of commits to push/pull, merge status, traffic lights for untracked/modified/staged
# Execution time and continuation prompt from pure (https://github.com/sindresorhus/pure)
# shellcheck disable=SC1090,SC2034,SC2016
# https://stackoverflow.com/a/28336473
# https://unix.stackexchange.com/a/115431
0="${(%):-%x}"
__MJE_THEME_DIR="$0:A:h"
source "$__MJE_THEME_DIR/src/shrink_path.zsh"
source "$__MJE_THEME_DIR/src/prompt_common.zsh"
# Main prompt
# TODO: Tweak colours? Blue is often hard to see
PROMPT='$(prompt_user_block)$(prompt_working_dir_block)
%_$(prompt_return_value_block)$(prompt_jobs_block)$(prompt_exec_time_block)$(prompt_docker_block)$(prompt_venv_block)$(prompt_char) '
# Continuation prompt
PROMPT2='%F{242}%_… %f> '
# TODO: is SSH_CONNECTION reliable?
# TODO: DEFAULT_MACHINE?
# TODO: Silence shellcheck warnings
# TODO: faster git checks