From 113f290826852a6bf5c38f3e2d6d38a22aa261cc Mon Sep 17 00:00:00 2001 From: romkatv Date: Mon, 2 Dec 2019 13:29:58 +0100 Subject: add vim_shell prompt segment; see #359 --- internal/icons.zsh | 5 +++++ internal/p10k.zsh | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'internal') diff --git a/internal/icons.zsh b/internal/icons.zsh index 17d6341b..abfc4b3d 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -112,6 +112,7 @@ function _p9k_init_icons() { LARAVEL_ICON '' RANGER_ICON '\u2B50' # ⭐ MIDNIGHT_COMMANDER_ICON 'mc' + VIM_ICON 'vim' TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️ PROXY_ICON '\u2B82' # ⮂ DOTNET_ICON '.NET' @@ -216,6 +217,7 @@ function _p9k_init_icons() { LARAVEL_ICON '' RANGER_ICON '\u2B50' # ⭐ MIDNIGHT_COMMANDER_ICON 'mc' + VIM_ICON 'vim' TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️ PROXY_ICON '\u2B82' # ⮂ DOTNET_ICON '.NET' @@ -324,6 +326,7 @@ function _p9k_init_icons() { LARAVEL_ICON '' RANGER_ICON '\u2B50' # ⭐ MIDNIGHT_COMMANDER_ICON 'mc' + VIM_ICON 'vim' TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️ PROXY_ICON '\u2B82' # ⮂ DOTNET_ICON '.NET' @@ -429,6 +432,7 @@ function _p9k_init_icons() { LARAVEL_ICON '\ue73f' #  RANGER_ICON '\u2B50' # ⭐ MIDNIGHT_COMMANDER_ICON 'mc' + VIM_ICON '\uE62B' #  TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️ PROXY_ICON '\u2B82' # ⮂ DOTNET_ICON '\uE77F' #  @@ -533,6 +537,7 @@ function _p9k_init_icons() { LARAVEL_ICON '' RANGER_ICON '\u2B50' # ⭐ MIDNIGHT_COMMANDER_ICON 'mc' + VIM_ICON 'vim' TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️ PROXY_ICON '\u2194' # ↔ DOTNET_ICON '.NET' diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 1e3e1e7d..83f55ecf 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -3455,6 +3455,15 @@ function instant_prompt_midnight_commander() { _p9k_prompt_segment prompt_midnight_commander $_p9k_color1 yellow MIDNIGHT_COMMANDER_ICON 0 '$MC_TMPDIR' '' } +function prompt_vim_shell() { + [[ -n $VIMRUNTIME ]] || return + _p9k_prompt_segment $0 green $_p9k_color1 VIM_ICON 0 '' '' +} + +function instant_prompt_vim_shell() { + _p9k_prompt_segment prompt_vim_shell green $_p9k_color1 VIM_ICON 0 '$VIMRUNTIME' '' +} + function prompt_terraform() { (( $+commands[terraform] )) || return local ws=default @@ -5376,7 +5385,7 @@ _p9k_must_init() { [[ $sig == $_p9k__param_sig ]] && return 1 _p9k_deinit fi - _p9k__param_pat=$'v12\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1' + _p9k__param_pat=$'v13\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1' _p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1' _p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1' _p9k__param_pat+=$'$DEFAULT_USER\1${ZLE_RPROMPT_INDENT:-1}\1$P9K_SSH\1$__p9k_ksh_arrays' -- cgit v1.2.3