public void Init(CommandEvaluationContext context) { // init settings var branchSymbol = Unicode.EdgeRowLeft; var sepSymbol = Unicode.RightChevron; context.ShellEnv.AddNew(_namespace, VarIsEnabled, true, false); var behindColor = "(b=darkred)"; var aheadColor = ANSI.SGR_SetBackgroundColor8bits(136); var infoColor = ANSI.SGR_SetBackgroundColor8bits(237 /*59*/); context.ShellEnv.AddNew(_namespace, VarInfoBackgroundColor, infoColor); context.ShellEnv.AddNew( _namespace, VarModifiedTextTemplate, $"%bgColor%(f=white) %repoName% {branchSymbol} %branch% %sepSymbol%%errorMessage%{infoColor}+%indexAdded% ~%indexChanges% -%indexDeleted% | ~%worktreeChanges% -%worktreeDeleted% ?%untracked%(rdc) ", false); context.ShellEnv.AddNew( _namespace, VarBehindTextTemplate, $"%bgColor%(f=white) %repoName% {branchSymbol} %branch% %sepSymbol%%errorMessage%{infoColor}+%indexAdded% ~%indexChanges% -%indexDeleted% | ~%worktreeChanges% -%worktreeDeleted% ?%untracked% {behindColor}{Unicode.ArrowDown}%behind%(rdc) ", false); context.ShellEnv.AddNew( _namespace, VarAheadBehindTextTemplate, $"%bgColor%(f=white) %repoName% {branchSymbol} %branch% %sepSymbol%%errorMessage%{infoColor}+%indexAdded% ~%indexChanges% -%indexDeleted% | ~%worktreeChanges% -%worktreeDeleted% ?%untracked% {aheadColor}{Unicode.ArrowUp}%ahead%{behindColor}{Unicode.ArrowDown}%behind%(rdc) ", false); context.ShellEnv.AddNew( _namespace, VarAheadTextTemplate, $"%bgColor%(f=white) %repoName% {branchSymbol} %branch% %sepSymbol%%errorMessage%{infoColor}+%indexAdded% ~%indexChanges% -%indexDeleted% | ~%worktreeChanges% -%worktreeDeleted% ?%untracked% {aheadColor}{Unicode.ArrowUp}%ahead%(rdc) ", false); context.ShellEnv.AddNew( _namespace, VarTextTemplateNoData, $"%bgColor%(f=white) %repoName% {branchSymbol} %branch% %errorMessage%(rdc) ", false); context.ShellEnv.AddNew( _namespace, VarTextTemplateNoRepository, $"(b=darkblue)(f=white) {sepSymbol} %errorMessage%(rdc) ", false); context.ShellEnv.AddNew(_namespace, VarBehindBackgroundColor, behindColor, false); context.ShellEnv.AddNew(_namespace, VarAheadBackgroundColor, aheadColor, false); context.ShellEnv.AddNew(_namespace, VarUpToDateBackgroundColor, ANSI.SGR_SetBackgroundColor8bits(22), false); context.ShellEnv.AddNew(_namespace, VarModifiedBackgroundColor, ANSI.SGR_SetBackgroundColor8bits(130), false); context.ShellEnv.AddNew(_namespace, VarModifiedUntrackedBackgroundColor, ANSI.SGR_SetBackgroundColor8bits(166), false); context.ShellEnv.AddNew(_namespace, VarUnknownBackgroundColor, "(b=darkblue)", false); }