Skip to content

How to always show the git branch name (switch off vcs truncation) ? #419

@SpawnAtis

Description

@SpawnAtis

Hi. I am trying to add this part in my .zshrc and .p10k.zsh, but it doesn't work (

POWERLEVEL9K_VCS_SHORTEN_LENGTH=none
POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH=none
POWERLEVEL9K_VCS_SHORTEN_STRATEGY=none
POWERLEVEL9K_VCS_SHORTEN_DELIMITER=none

I haven't modified.p10k.zsh after p10k configure.
My .zshrc:

if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history	

echo -ne '\e[6 q' # Use beam shape cursor on startup.
preexec() { echo -ne '\e[6 q' ;} # Use beam shape cursor for each new prompt.

rangercd () {
    tmp="$(mktemp)"
    ranger --choosedir="$tmp" "$@"
    if [ -f "$tmp" ]; then
        dir="$(cat "$tmp")"
        rm -f "$tmp"
        [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"                                               
    fi
}
bindkey -s '^o' 'rangercd\n'
bindkey "[D" backward-word        #move one word backward
bindkey "[C" forward-word         #move one word forward
bindkey "^[a" beginning-of-line   #move to beginning of line
bindkey "^[e" end-of-line         #move to end of line

## POWERLEVEL10K settings
ZSH_THEME="powerlevel10k/powerlevel10k"

plugins=(
   osx
   yarn
   nvm
   jenv
)

export ZSH="/Users/spawn/.oh-my-zsh"
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
export ANDROID_HOME=/Users/${USER}/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export PATH="/usr/local/opt/ruby/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/ruby/lib"
export CPPFLAGS="-I/usr/local/opt/ruby/include"
export PKG_CONFIG_PATH="/usr/local/opt/ruby/lib/pkgconfig"

source $ZSH/oh-my-zsh.sh

[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

POWERLEVEL9K_VCS_SHORTEN_LENGTH=none
POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH=none
POWERLEVEL9K_VCS_SHORTEN_STRATEGY=none
POWERLEVEL9K_VCS_SHORTEN_DELIMITER=none
POWERLEVEL9K_VCS_HIDE_TAGS=none

# Load aliases and shortcuts if existent.
[ -f "$HOME/.config/shortcutrc" ] && source "$HOME/.config/shortcutrc"
[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"

## ⚠️ Must be at the end
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# added by travis gem
[ -f /Users/spawn/.travis/travis.sh ] && source /Users/spawn/.travis/travis.sh

Screen Shot 2020-01-15 at 00 24 22

Thx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions