From 685f99f184858c8367868ebc8701522b765889c9 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 1 Jun 2021 22:20:28 +0900 Subject: Revert "Add starship.toml" This reverts commit 33d1e3dca1531757b768a23777620a212804f529. --- .zshrc | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index eb2fb3f..9b34ce5 100644 --- a/.zshrc +++ b/.zshrc @@ -221,6 +221,7 @@ function __cd_parent_dir() { [ -e $BUFFER ] || return pushd .. > /dev/null + __update_vcs_info zle reset-prompt } zle -N __cd_parent_dir @@ -231,6 +232,7 @@ function __cd_prev_dir() { [ -e $BUFFER ] || return popd > /dev/null + __update_vcs_info zle reset-prompt } zle -N __cd_prev_dir @@ -252,6 +254,39 @@ bindkey "^G" __cd_project_root_dir zmodload zsh/complist + +autoload -Uz vcs_info + + +zstyle ':vcs_info:git:*' check-for-changes true +zstyle ':vcs_info:git:*' unstagedstr "+" +zstyle ':vcs_info:*' formats " (%b)%u" +zstyle ':vcs_info:*' actionformats ' (%b %a)%u' + + +function __update_vcs_info() { + psvar=() + LANG=en_US.UTF-8 vcs_info + if [[ -n "$vcs_info_msg_0_" ]]; then + psvar[1]="$vcs_info_msg_0_" + fi +} + +function precmd() { + __update_vcs_info +} + + + +PROMPT=" +%75F%B%~%b%1(v,%1v,) +%150F❯%153F❯%159F❯%f " + +PROMPT2="%63F❯%62F❯%61F❯%f " + +SPROMPT="%179F%BDid you mean %r? (n/y):%b%f " + + HISTFILE=$HOME/.zsh_history HISTSIZE=1000000 SAVEHIST=1000000 @@ -325,7 +360,3 @@ export PATH=/usr/local/opt/gettext/bin:$PATH # To override system-provided Ruby with brewed Ruby export PATH=/usr/local/opt/ruby/bin:$PATH - - - -eval "$(starship init zsh)" -- cgit v1.2.3-70-g09d2