zsh shrink_path in prompt

This commit is contained in:
James Walker 2020-03-05 20:57:39 -05:00
parent e1c9fd7e30
commit 3aaec99112
Signed by: walkah
GPG Key ID: 3C127179D6086E93
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ function asdf_prompt() {
echo $(asdf current $1|awk '{print $1}')
}
PROMPT='%{$fg[$HCOLOR]%}%m%{$reset_color%}:%c $(git_prompt_info)%{$fg[red]%}%(!.#.»)%{$reset_color%} '
PROMPT='%{$fg[$HCOLOR]%}%m%{$reset_color%}:$(shrink_path -f) $(git_prompt_info)%{$fg[red]%}%(!.#.»)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
if (( $+commands[asdf] )); then
RPS1='%{$fg[cyan]%}(%{$fg[red]%}$(asdf_prompt ruby) %{$fg[green]%}$(asdf_prompt nodejs) %{$fg[blue]%}$(asdf_prompt python)%{$fg[cyan]%}) %{$reset_color%}${return_code}'

View File

@ -19,7 +19,7 @@ export ZSH_CUSTOM=$HOME/.zsh/custom
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(asdf aws gcloud extract command-not-found tmux tmuxinator git github ssh-agent docker docker-compose mix-fast)
plugins=(asdf shrink-path aws gcloud extract command-not-found tmux tmuxinator git github ssh-agent docker docker-compose mix-fast)
# ruby
if [ -x ruby ]; then