feature: added perlbrew
This commit is contained in:
parent
123136c0e7
commit
b898d1de15
5 changed files with 72 additions and 0 deletions
|
@ -3115,6 +3115,26 @@ _p9k_prompt_plenv_init() {
|
|||
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${commands[plenv]:-${${+functions[plenv]}:#0}}'
|
||||
}
|
||||
|
||||
################################################################
|
||||
# Segment to display perlbrew information
|
||||
# https://github.com/gugod/App-perlbrew
|
||||
|
||||
prompt_perlbrew() {
|
||||
[[ -n $PERLBREW_PERL && ( -v commands[perlbrew] || -v functions[perlbrew] ) ]] || return
|
||||
if (( _POWERLEVEL9K_PERLBREW_PROJECT_ONLY )); then
|
||||
_p9k_upglob 'cpanfile|(MY|)META.(yml|json)|.perltidyrc|(Makefile|Build).PL|*.(pl|pm|t|pod)' && return
|
||||
fi
|
||||
|
||||
local v=$PERLBREW_PERL
|
||||
(( _POWERLEVEL9K_PERLBREW_SHOW_PREFIX )) || v=${v#*-}
|
||||
[[ -n $v ]] || return
|
||||
_p9k_prompt_segment "$0" "blue" "$_p9k_color1" 'PERL_ICON' 0 '' "${v//\%/%%}"
|
||||
}
|
||||
|
||||
_p9k_prompt_perlbrew_init() {
|
||||
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${commands[perlbrew]:-${${+functions[perlbrew]}:#0}}'
|
||||
}
|
||||
|
||||
################################################################
|
||||
# Segment to display chruby information
|
||||
# see https://github.com/postmodern/chruby/issues/245 for chruby_auto issue with ZSH
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue