diff options
| author | Blista Kanjo | 2023-08-02 21:37:48 -0400 |
|---|---|---|
| committer | Blista Kanjo | 2023-08-02 21:37:48 -0400 |
| commit | 08e564a8e1d4c13ad4c046ca4bfc9ca7f72373bd (patch) | |
| tree | 62a2e505756e7eb0fa6263a80b12439e151dbfb4 /.config/shell/git-prompt_examples/kj_sh604.zsh | |
| parent | f36a9b8752cd9b37eb7961dd44238120806454b3 (diff) | |
refactor: remove duplicate folder
Diffstat (limited to '.config/shell/git-prompt_examples/kj_sh604.zsh')
| -rw-r--r-- | .config/shell/git-prompt_examples/kj_sh604.zsh | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/.config/shell/git-prompt_examples/kj_sh604.zsh b/.config/shell/git-prompt_examples/kj_sh604.zsh deleted file mode 100644 index 8d0ab86..0000000 --- a/.config/shell/git-prompt_examples/kj_sh604.zsh +++ /dev/null @@ -1,70 +0,0 @@ -# Name: [Pure](https://github.com/sindresorhus/pure) clone -# Description: -# This clone of the Pure prompt has support for Python virtualenvs, but none of the timing -# features or a vi mode. If you are using [fzf](https://github.com/junegunn/fzf), source the -# example after sourcing fzf's keybindings. -# -# If you want to try other examples again after sourcing the Pure example, you might have to -# restart your shell, because this prompt will always print a newline between prompts. - -ZSH_GIT_PROMPT_FORCE_BLANK=1 -ZSH_GIT_PROMPT_SHOW_UPSTREAM="yes" - -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_no_bold[white]%}(" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg_no_bold[white]%}) " -ZSH_THEME_GIT_PROMPT_SEPARATOR=" " -ZSH_THEME_GIT_PROMPT_DETACHED="%{$fg_no_bold[cyan]%}:" -ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_no_bold[magenta]%}" -ZSH_THEME_GIT_PROMPT_UPSTREAM_SYMBOL="%{$fg_bold[yellow]%}^ " -ZSH_THEME_GIT_PROMPT_UPSTREAM_PREFIX="%{$fg[red]%}(%{$fg[yellow]%}" -ZSH_THEME_GIT_PROMPT_UPSTREAM_SUFFIX="%{$fg[red]%})" -ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_no_bold[white]%} ↓" -ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_no_bold[white]%} ↑" -ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%}x" -ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[yellow]%}•" -ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[blue]%}+" -ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[blue]%}U " -ZSH_THEME_GIT_PROMPT_STASHED="%{$fg[blue]%}☐" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}✓" - -# In the second line of the prompt $psvar[12] is read -PROMPT=$'%F{cyan}%~%f %F{242}$(gitprompt)%f%(12V.%F{242}%12v%f .)%(?.%F{white}.%F{red})%%%f ' - -setup() { - [[ -n $_PROMPT_INITIALIZED ]] && return - _PROMPT_INITIALIZED=1 - - # Prevent Python virtualenv from modifying the prompt - export VIRTUAL_ENV_DISABLE_PROMPT=1 - - # Set $psvar[12] to the current Python virtualenv - function _prompt_update_venv() { - psvar[12]= - if [[ -n $VIRTUAL_ENV ]] && [[ -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then - psvar[12]="${VIRTUAL_ENV:t}" - fi - } - add-zsh-hook precmd _prompt_update_venv - - # Draw a newline between every prompt - function _prompt_newline(){ - if [[ -z "$_PROMPT_NEWLINE" ]]; then - _PROMPT_NEWLINE=1 - elif [[ -n "$_PROMPT_NEWLINE" ]]; then - echo - fi - } - add-zsh-hook precmd _prompt_newline - - # To avoid glitching with fzf's alt+c binding we override the fzf-redraw-prompt widget. - # The widget by default reruns all precmd hooks, which prints the newline again. - # We therefore run all precmd hooks except _prompt_newline. - function fzf-redraw-prompt() { - local precmd - for precmd in ${precmd_functions:#_prompt_newline}; do - $precmd - done - zle reset-prompt - } -} -setup |
