Users browsing this thread: 1 Guest(s)
crshd
Registered
Did some slight modifications:

Default:
[Image: zsh_normal.png]

Debug mode:
[Image: zsh_debug.png]

Active Python virtualenv:
[Image: zsh_venv.png]

Error code:
[Image: zsh_error.png]

VCS status:
[Image: zsh_git.png]

Background jobs:
[Image: zsh_jobs.png]

ZLE Vim "Normal" mode:
[Image: zsh_vim.png]

Code:
setprompt() {
    local IT=${terminfo[sitm]}${terminfo[bold]}
    local ST=${terminfo[sgr0]}${terminfo[ritm]}
#    local FMT_BRANCH="%F{9}(%s:%F{7}%{$IT%}%r%{$ST%}%F{9}) %F{11}%B%b %K{235}%{$IT%}%u%c%{$ST%}%k
    local FMT_BRANCH="%F{9}(%s:%F{7}%{$IT%}%r%{$ST%}%F{9}) %F{11}%B%b %K{0}%{$IT%}%u%c%{$ST%}%k
"
    local FMT_ACTION="(%F{3}%a%f)"
    local FMT_PATH="%F{1}%R%F{2}/%S%f"

    local RETURN="%(?..%F{9}%B!%b%f%F{1}%?%f )"
    local NAME="%F{4}%B%n%b%f"
    local HOST="%F{1}%B%m%b%f"
    local PATH="%F{8}[%F{3}%40<…<%~%<<%F{8}]%f"
    local JOBS="%(1j.%K{1}%F{235}%B%j%b%f%k .)"
    local VIM=${${KEYMAP/vicmd/%K{2}%F{0} N %f%k }/(main|viins)/}

    local DE=${DEBUG:+%F{9}DEBUG%f }
    local VENV=${VIRTUAL_ENV:+%F{3}VENV%f }
    PROMPT="${vcs_info_msg_0_}${VIM}${RETURN}${JOBS}${VENV}${DE}${NAME}%F{8}@%f${HOST}${PATH}
%B%#%b "
    RPROMPT=""
    PS2=%_

    # vcs_info
    zstyle ':vcs_info:*'                      enable git hg svn
    zstyle ':vcs_info:*' check-for-changes true
    zstyle ':vcs_info:*' unstagedstr '%F{62}D%F{237}IRTY%f'
    zstyle ':vcs_info:*' stagedstr '%F{62}S%F{237}TAGED'
    zstyle ':vcs_info:*' actionformats "${FMT_BRANCH}${FMT_ACTION}" "zsh: %r"
    zstyle ':vcs_info:*' formats       "${FMT_BRANCH}"              "zsh: %r"
    zstyle ':vcs_info:*' nvcsformats   ""                           "%~"
}

function zle-line-init zle-keymap-select {
    setprompt
    zle reset-prompt
}

zle -N zle-line-init
zle -N zle-keymap-select

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCA/IT d-(---)@ s+: a-- C+++(++++)$ UBL*+++ P+++>++++ L++ E W+++$ !N !o K !w !O M+>++ !V PS+++ PE !Y PGP+ !t-- !5 !X R@ tv- b+ DI D+ G e h r++ y+
------END GEEK CODE BLOCK------



Messages In This Thread
Your PROMPT - by venam - 24-10-2012, 12:34 PM
RE: Your PROMPT - by simon - 24-10-2012, 12:56 PM
RE: Your PROMPT - by fb0x - 24-10-2012, 01:04 PM
RE: Your PROMPT - by crshd - 24-10-2012, 02:09 PM
RE: Your PROMPT - by Mafia - 24-10-2012, 02:10 PM
RE: Your PROMPT - by bash - 20-11-2012, 05:18 PM
RE: Your PROMPT - by Mafia - 21-11-2012, 07:28 PM
RE: Your PROMPT - by gurhush - 20-11-2012, 06:10 PM
RE: Your PROMPT - by zygotb - 21-11-2012, 01:21 AM
RE: Your PROMPT - by crshd - 21-11-2012, 11:11 PM
RE: Your PROMPT - by gurhush - 09-12-2012, 05:30 AM
RE: Your PROMPT - by TheHotBot - 09-12-2012, 08:22 AM
RE: Your PROMPT - by yrmt - 09-12-2012, 09:50 AM
RE: Your PROMPT - by gurhush - 24-12-2012, 02:57 PM
RE: Your PROMPT - by yrmt - 24-12-2012, 05:07 PM
RE: Your PROMPT - by crshd - 09-12-2012, 11:27 AM
RE: Your PROMPT - by yrmt - 09-12-2012, 12:26 PM
RE: Your PROMPT - by yrmt - 13-12-2012, 03:14 PM
RE: Your PROMPT - by crshd - 14-12-2012, 06:31 AM
RE: Your PROMPT - by gurhush - 25-12-2012, 11:37 PM
RE: Your PROMPT - by gurhush - 09-01-2013, 06:05 AM
RE: Your PROMPT - by Ivyl - 12-01-2013, 12:41 PM
RE: Your PROMPT - by crshd - 14-01-2013, 11:07 AM
RE: Your PROMPT - by yrmt - 14-01-2013, 03:14 PM
RE: Your PROMPT - by Mafia - 14-01-2013, 06:05 PM
RE: Your PROMPT - by eye - 18-01-2013, 02:02 PM
RE: Your PROMPT - by darthlukan - 04-10-2015, 09:53 AM
RE: Your PROMPT - by ashen - 04-10-2015, 12:10 PM
RE: Your PROMPT - by Mafia - 04-10-2015, 10:46 PM
RE: Your PROMPT - by josuah - 03-04-2016, 11:28 PM
RE: Your PROMPT - by ninjacharlie - 04-04-2016, 03:49 PM
RE: Your PROMPT - by neeasade - 04-04-2016, 04:01 PM
RE: Your PROMPT - by Adrift - 04-04-2016, 11:24 PM
RE: Your PROMPT - by venam - 05-04-2016, 12:51 AM
RE: Your PROMPT - by neeasade - 05-04-2016, 09:12 AM
RE: Your PROMPT - by rocx - 05-04-2016, 09:41 AM
RE: Your PROMPT - by venam - 09-11-2020, 04:04 AM
RE: Your PROMPT - by jkl - 09-11-2020, 04:43 AM
RE: Your PROMPT - by pyratebeard - 09-11-2020, 06:27 AM
RE: Your PROMPT - by eye - 09-11-2020, 10:18 AM
RE: Your PROMPT - by seninha - 09-11-2020, 11:13 AM
RE: Your PROMPT - by pfr - 10-11-2020, 09:25 AM
RE: Your PROMPT - by opfez - 10-11-2020, 10:58 AM
RE: Your PROMPT - by jolia - 10-11-2020, 05:58 PM
RE: Your PROMPT - by sulami - 11-11-2020, 07:11 AM
RE: Your PROMPT - by s0kx - 11-11-2020, 09:11 AM
RE: Your PROMPT - by jolia - 11-11-2020, 09:37 AM
RE: Your PROMPT - by jkl - 11-11-2020, 01:20 PM
RE: Your PROMPT - by neeasade - 11-11-2020, 02:41 PM
RE: Your PROMPT - by sulami - 11-11-2020, 04:57 PM