mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
Initial message
This commit is contained in:
parent
7363cbcf31
commit
e41d6a9106
5 changed files with 17 additions and 4 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,5 +1,5 @@
|
|||
# custom files
|
||||
custom/
|
||||
# custom/
|
||||
|
||||
# temp files directories
|
||||
cache/
|
||||
|
|
|
|||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "custom/plugins/zsh-autosuggestions"]
|
||||
path = custom/plugins/zsh-autosuggestions
|
||||
url = https://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||
1
custom/plugins/zsh-autosuggestions
Submodule
1
custom/plugins/zsh-autosuggestions
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit a411ef3e0992d4839f0732ebeb9823024afaaaa8
|
||||
1
custom/plugins/zsh-syntax-highlighting
Submodule
1
custom/plugins/zsh-syntax-highlighting
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit b2c910a85ed84cb7e5108e7cb3406a2e825a858f
|
||||
|
|
@ -89,7 +89,7 @@ prompt_end() {
|
|||
# Context: user@hostname (who am I and where am I)
|
||||
prompt_context() {
|
||||
if [[ "$USERNAME" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
|
||||
prompt_segment black default "%(!.%{%F{yellow}%}.)%n@%m"
|
||||
prompt_segment black default "%(!.%{%F{yellow}%}.)%n"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
@ -217,7 +217,7 @@ prompt_hg() {
|
|||
|
||||
# Dir: current working directory
|
||||
prompt_dir() {
|
||||
prompt_segment blue $CURRENT_FG '%~'
|
||||
prompt_segment blue $CURRENT_FG '%2d'
|
||||
}
|
||||
|
||||
# Virtualenv: current working virtualenv
|
||||
|
|
@ -249,16 +249,24 @@ prompt_status() {
|
|||
prompt_aws() {
|
||||
[[ -z "$AWS_PROFILE" || "$SHOW_AWS_PROMPT" = false ]] && return
|
||||
case "$AWS_PROFILE" in
|
||||
*-prod|*production*) prompt_segment red yellow "AWS: ${AWS_PROFILE:gs/%/%%}" ;;
|
||||
*prod|*production*) prompt_segment red black "AWS: ${AWS_PROFILE:gs/%/%%}" ;;
|
||||
*) prompt_segment green black "AWS: ${AWS_PROFILE:gs/%/%%}" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
prompt_shell() {
|
||||
[[ -z "$SHELL_PROFILE" || "$SHOW_AWS_PROMPT" = false ]] && return
|
||||
case "$SHELL_PROFILE" in
|
||||
*prod|*production*) prompt_segment red black "${SHELL_PROFILE:gs/%/%%}" ;;
|
||||
*) prompt_segment green black "${SHELL_PROFILE:gs/%/%%}" ;;
|
||||
esac
|
||||
}
|
||||
## Main prompt
|
||||
build_prompt() {
|
||||
RETVAL=$?
|
||||
prompt_status
|
||||
prompt_virtualenv
|
||||
prompt_shell
|
||||
prompt_aws
|
||||
prompt_context
|
||||
prompt_dir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue