From 1d4e03ca820d2ac6d57652ab00b45a848b494caf Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 28 Sep 2021 19:20:46 +0200 Subject: zsh: Remove custom ZSH prompts Remove loading of custom prompts in .zsh.prompts/* as they are very slow and there are far better cross-shell alternatives such as starship. --- .zsh.prompts/prompt_dvzrv_setup | 91 ----------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 .zsh.prompts/prompt_dvzrv_setup (limited to '.zsh.prompts/prompt_dvzrv_setup') diff --git a/.zsh.prompts/prompt_dvzrv_setup b/.zsh.prompts/prompt_dvzrv_setup deleted file mode 100644 index c4093b7..0000000 --- a/.zsh.prompts/prompt_dvzrv_setup +++ /dev/null @@ -1,91 +0,0 @@ -# -# A theme based on Steve Losh's Extravagant Prompt with vcs_info integration. -# -# Authors: -# Steve Losh -# Bart Trojanowski -# Brian Carper -# steeef_simplified -# Sorin Ionescu -# -# Screenshots: -# http://i.imgur.com/HyRvv.png -# - -function prompt_steeef_simplified_precmd { - # Check for untracked files or updated submodules since vcs_info does not. - if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then - branch_format="(${_prompt_steeef_simplified_colors[1]}%b%f%u%c${_prompt_steeef_simplified_colors[4]}●%f)" - else - branch_format="(${_prompt_steeef_simplified_colors[1]}%b%f%u%c)" - fi - - zstyle ':vcs_info:*:prompt:*' formats "${branch_format}" - - vcs_info 'prompt' - - if (( $+functions[python-info] )); then - python-info - fi - - # Get ruby information -# if (( $+functions[ruby-info] )); then -# ruby-info -# fi -} - -# Check if this shell is run through ssh -function ssh_connection { - if [[ -n $SSH_CONNECTION ]]; then - echo "[%F{red}ssh%f] " - fi -} - -function prompt_steeef_simplified_setup { - setopt LOCAL_OPTIONS - unsetopt XTRACE KSH_ARRAYS - prompt_opts=(cr percent subst) - - # Load required functions. - autoload -Uz add-zsh-hook - autoload -Uz vcs_info - - # Add hook for calling vcs_info before each command. - add-zsh-hook precmd prompt_steeef_simplified_precmd - - _prompt_steeef_simplified_colors=( - "%F{cyan}" - "%F{yellow}" - "%F{magenta}" - "%F{red}" - "%F{green}" - ) - - # Formats: - # %b - branchname - # %u - unstagedstr (see below) - # %c - stagedstr (see below) - # %a - action (e.g. rebase-i) - # %R - repository path - # %S - path in the repository - local branch_format="(${_prompt_steeef_simplified_colors[1]}%b%f%u%c)" - local action_format="(${_prompt_steeef_simplified_colors[5]}%a%f)" - local unstaged_format="${_prompt_steeef_simplified_colors[2]}●%f" - local staged_format="${_prompt_steeef_simplified_colors[5]}●%f" - - # Set vcs_info parameters. - zstyle ':vcs_info:*' enable bzr git hg svn - zstyle ':vcs_info:*:prompt:*' check-for-changes true - zstyle ':vcs_info:*:prompt:*' unstagedstr "${unstaged_format}" - zstyle ':vcs_info:*:prompt:*' stagedstr "${staged_format}" - zstyle ':vcs_info:*:prompt:*' actionformats "${branch_format}${action_format}" - zstyle ':vcs_info:*:prompt:*' formats "${branch_format}" - zstyle ':vcs_info:*:prompt:*' nvcsformats "" - - # Define prompts. - PROMPT="$(ssh_connection)${_prompt_steeef_simplified_colors[3]}%n%f@${_prompt_steeef_simplified_colors[2]}%m%f ${_prompt_steeef_simplified_colors[5]}%~%f "'${vcs_info_msg_0_}'"$ " - RPROMPT="%(?..[%F{red}%?%f] )" -} - -prompt_steeef_simplified_setup "$@" - -- cgit v1.2.3-70-g09d2