diff --git a/.gitignore b/.gitignore index 10bd4bebc..d9302465a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # custom files -custom/ +# custom/ # temp files directories cache/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..421c70546 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "custom/plugins/zsh-autosuggestions"] + path = custom/plugins/zsh-autosuggestions + url = https://github.com/zsh-users/zsh-syntax-highlighting.git diff --git a/custom/plugins/zsh-autosuggestions b/custom/plugins/zsh-autosuggestions new file mode 160000 index 000000000..a411ef3e0 --- /dev/null +++ b/custom/plugins/zsh-autosuggestions @@ -0,0 +1 @@ +Subproject commit a411ef3e0992d4839f0732ebeb9823024afaaaa8 diff --git a/custom/plugins/zsh-syntax-highlighting b/custom/plugins/zsh-syntax-highlighting new file mode 160000 index 000000000..b2c910a85 --- /dev/null +++ b/custom/plugins/zsh-syntax-highlighting @@ -0,0 +1 @@ +Subproject commit b2c910a85ed84cb7e5108e7cb3406a2e825a858f diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index c2a542163..99d678930 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -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