Initial message

This commit is contained in:
Yogeshwaran Rajendran 2023-01-14 01:46:42 +05:30
commit e41d6a9106
5 changed files with 17 additions and 4 deletions

2
.gitignore vendored
View file

@ -1,5 +1,5 @@
# custom files # custom files
custom/ # custom/
# temp files directories # temp files directories
cache/ cache/

3
.gitmodules vendored Normal file
View 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

@ -0,0 +1 @@
Subproject commit a411ef3e0992d4839f0732ebeb9823024afaaaa8

@ -0,0 +1 @@
Subproject commit b2c910a85ed84cb7e5108e7cb3406a2e825a858f

View file

@ -89,7 +89,7 @@ prompt_end() {
# Context: user@hostname (who am I and where am I) # Context: user@hostname (who am I and where am I)
prompt_context() { prompt_context() {
if [[ "$USERNAME" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then if [[ "$USERNAME" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)%n@%m" prompt_segment black default "%(!.%{%F{yellow}%}.)%n"
fi fi
} }
@ -217,7 +217,7 @@ prompt_hg() {
# Dir: current working directory # Dir: current working directory
prompt_dir() { prompt_dir() {
prompt_segment blue $CURRENT_FG '%~' prompt_segment blue $CURRENT_FG '%2d'
} }
# Virtualenv: current working virtualenv # Virtualenv: current working virtualenv
@ -249,16 +249,24 @@ prompt_status() {
prompt_aws() { prompt_aws() {
[[ -z "$AWS_PROFILE" || "$SHOW_AWS_PROMPT" = false ]] && return [[ -z "$AWS_PROFILE" || "$SHOW_AWS_PROMPT" = false ]] && return
case "$AWS_PROFILE" in 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/%/%%}" ;; *) prompt_segment green black "AWS: ${AWS_PROFILE:gs/%/%%}" ;;
esac 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 ## Main prompt
build_prompt() { build_prompt() {
RETVAL=$? RETVAL=$?
prompt_status prompt_status
prompt_virtualenv prompt_virtualenv
prompt_shell
prompt_aws prompt_aws
prompt_context prompt_context
prompt_dir prompt_dir