chore(zsh): remove starship prompt
This commit is contained in:
parent
5e81f42460
commit
b7518872ff
3 changed files with 15 additions and 2 deletions
|
@ -8,5 +8,3 @@ antigen bundle zsh-users/zsh-completions
|
||||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||||
|
|
||||||
antigen apply
|
antigen apply
|
||||||
|
|
||||||
eval "$(starship init zsh)"
|
|
||||||
|
|
14
roles/zsh/files/.zsh/configs/prompt.zsh
Normal file
14
roles/zsh/files/.zsh/configs/prompt.zsh
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
source /usr/lib/git-core/git-sh-prompt
|
||||||
|
|
||||||
|
setopt promptsubst
|
||||||
|
|
||||||
|
git_prompt() {
|
||||||
|
local branch="$(git symbolic-ref HEAD 2> /dev/null | cut -d'/' -f3)"
|
||||||
|
local branch_truncated="${branch:0:30}"
|
||||||
|
if (( ${#branch} > ${#branch_truncated} )); then
|
||||||
|
branch="${branch_truncated}..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -n "${branch}" ] && echo " (${branch})"
|
||||||
|
}
|
||||||
|
export PS1="in %{$fg[blue]%}%~%{$fg[yellow]%}$(git_prompt)%{$reset_color%} %(?.$.%{$fg[red]%}$)%b "
|
|
@ -12,6 +12,7 @@ sources=(
|
||||||
'path'
|
'path'
|
||||||
'platformsh'
|
'platformsh'
|
||||||
'plugins'
|
'plugins'
|
||||||
|
'prompt'
|
||||||
'post/completion'
|
'post/completion'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue