From 67c7df699ada8ed0f99b6ef7367d3e29a33e1454 Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Wed, 22 Dec 2021 17:39:29 -0600 Subject: [PATCH] Remove old prompt --- zsh/configs/prompt.zsh.local | 66 ------------------------------------ 1 file changed, 66 deletions(-) delete mode 100644 zsh/configs/prompt.zsh.local diff --git a/zsh/configs/prompt.zsh.local b/zsh/configs/prompt.zsh.local deleted file mode 100644 index 118aea6..0000000 --- a/zsh/configs/prompt.zsh.local +++ /dev/null @@ -1,66 +0,0 @@ -source $(brew --prefix)/opt/gitstatus/gitstatus.plugin.zsh MY - -gitstatus_startMY MY - -export GIT_PROMPT="" - -update_git_prompt() { - typeset -g GIT_PROMPT="" - - gitstatus_queryMY MY || return - [[ $VCS_STATUS_RESULT == ok-sync ]] || return - - GIT_PROMPT+="%{$fg[blue]%}[%{$fg_bold[blue]%}${VCS_STATUS_LOCAL_BRANCH}%{$reset_color%}" - - if [[ $VCS_STATUS_HAS_STAGED == 1 ]]; then - GIT_PROMPT+="%{$fg_bold[yellow]%}+%{$reset_color%}" - fi - - if [[ $VCS_STATUS_HAS_UNSTAGED == 1 ]]; then - GIT_PROMPT+="%{$fg_bold[red]%}*%{$reset_color%}" - fi - - GIT_PROMPT+="%{$fg[blue]%}]%{$reset_color%} " -} - -os_icon() { - case $(uname) in - Darwin) - echo "%{$fg[white]%} macOS%{$reset_color%}" - ;; - Linux) - echo "%{$fg[yellow]%} Linux%{$reset_color%}" - ;; - FreeBSD) - echo "%{$fg[red]%} FreeBSD%{$reset_color%}" - ;; - OpenBSD) - echo "%{$fg[yellow]%}OpenBSD%{$reset_color%}" - ;; - esac -} - -autoload -Uz add-zsh-hook - -add-zsh-hook precmd update_git_prompt - -# makes color constants available -autoload -U colors -colors - -# enable colored output from ls, etc -export CLICOLOR=1 - -# expand functions in the prompt -setopt promptsubst - -# prompt -export PROMPT='$(os_icon) ${SSH_CONNECTION+"%{$fg[yellow]%}%n@%m%{$reset_color%}:"}%{$fg_bold[green]%}%2c%{$reset_color%} ${GIT_PROMPT}%{$fg_bold[cyan]%}❯%{$reset_color%} ' -export RPROMPT='%D{%K:%M:%S}' - -# update the prompt on carriage return -function _reset-prompt-and-accept-line { - zle reset-prompt - zle .accept-line -} -zle -N accept-line _reset-prompt-and-accept-line