zsh shrink_path in prompt
This commit is contained in:
parent
e1c9fd7e30
commit
3aaec99112
@ -7,7 +7,7 @@ function asdf_prompt() {
|
|||||||
echo $(asdf current $1|awk '{print $1}')
|
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%}'
|
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||||
if (( $+commands[asdf] )); then
|
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}'
|
RPS1='%{$fg[cyan]%}(%{$fg[red]%}$(asdf_prompt ruby) %{$fg[green]%}$(asdf_prompt nodejs) %{$fg[blue]%}$(asdf_prompt python)%{$fg[cyan]%}) %{$reset_color%}${return_code}'
|
||||||
|
@ -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/*)
|
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
# 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
|
# ruby
|
||||||
if [ -x ruby ]; then
|
if [ -x ruby ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user