File: VCS_INFO_get_data_mtn

package info (click to toggle)
zsh 5.9-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,856 kB
  • sloc: ansic: 108,138; sh: 6,976; makefile: 722; perl: 687; awk: 291; sed: 16
file content (12 lines) | stat: -rw-r--r-- 410 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
## vim:ft=zsh
## monotone support by: Frank Terbeck <ft@bewatermyfriend.org>
## Distributed under the same BSD-ish license as zsh itself.

setopt localoptions extendedglob NO_shwordsplit
local mtnbranch mtnbase

mtnbase=${vcs_comm[basedir]}
rrn=${mtnbase:t}
mtnbranch=${${(M)${(f)"$( ${vcs_comm[cmd]} status )"}:#(#s)Current branch:*}/*: /}
VCS_INFO_formats '' "${mtnbranch}" "${mtnbase}" '' '' '' ''
return 0