diff options
author | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2013-11-13 17:21:04 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2013-11-13 17:21:04 +0100 |
commit | 21fd31d52bc1c2dd8b90f81a560a0bf16556b8db (patch) | |
tree | 6ec2c75c80bd97490a78983430027d935f7a2f06 /net:foret/Internal.zsh | |
parent | 59afe2a2b500504ace9dfb853f6a8f38c732284b (diff) |
[Prompt] Trick or treat ?
Diffstat (limited to 'net:foret/Internal.zsh')
-rw-r--r-- | net:foret/Internal.zsh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/net:foret/Internal.zsh b/net:foret/Internal.zsh new file mode 100644 index 0000000..3bf6c65 --- /dev/null +++ b/net:foret/Internal.zsh @@ -0,0 +1,22 @@ + +__get_git_fullstatus () +{ + [ -n "$1" ] && pushd $1 >/dev/null + + local _branch _status _tracking _stashes + + _branch=$(__get_git_branch) + + if [ -n "$_branch" ] + then + _status=$(__get_git_branch_status) + _branch=$C_$_prompt_colors[soft_generic]$_C${${_branch/→/$C_$_status$_C}/←/$C_$_prompt_colors[soft_generic]$_C}$C_$color[none]$_C + _tracking=$(__get_git_tracking_status) + _stashes=$(__get_git_stashes) + fi + + [ -n "$1" ] && popd >/dev/null + + echo $_branch${_tracking:+ $_tracking}${_stashes:+ $_stashes} | sed 's/_for_\(ixm\|df\)/’/g' + +} |