项目作者: OrbitalShell

项目描述 :
Add information about any current or parent GIT repository to orbital shell command line prompt. for example: OrbitalShell ├ master +0 ~0 -0 | ~2 -0 ?2
高级语言: C#
项目地址: git://github.com/OrbitalShell/Prompt-Git-Info.git
创建时间: 2021-02-14T18:01:34Z
项目社区:https://github.com/OrbitalShell/Prompt-Git-Info

开源协议:MIT License

下载


Prompt Git Info

Module for Orbital Shell

Add custom text to the prompt of console showing the status of git repositories if the current directory is above a repository folder

.NET
last commit
releasever
releasedate


toplanguage
lngcount


codesize
reposize

Usage

install into the shell:

  1. > module -i prompt-git-info

disable/enable:

  1. > prompt-info -e false
  2. > prompt-info -e true

Preview

up to date

worktree changed

index changed

ahead

behind

behind + behind message

ahead/behind

ahead/behind + behind message

no repo

Settings

namespace env.com.git.promptInfo

variable type value
isEnabled bool true
isEnabledGetRemoteStatus bool true
runInBackgroundTask bool false
infoBackgroundColor string \e[48;5;237 m
modifiedTextTemplate string %bgColor%(f=white) %repoName% ├ %branch% %sepSymbol%%errorMessage%\e[48;5;237m+%indexAdded% ~%indexChanges% -%indexDeleted% \ ~%worktreeChanges% -%worktreeDeleted% ?%untracked%(rdc )
behindTextTemplate string %bgColor%(f=white) %repoName% ├ %branch% %sepSymbol%%errorMessage%\e[48;5;237m+%indexAdded% ~%indexChanges% -%indexDeleted% \ ~%worktreeChanges% -%worktreeDeleted% ?%untracked% (b=darkred)↓%behind%%behindMessage%(rdc)
aheadBehindTextTemplate string %bgColor%(f=white) %repoName% ├ %branch% %sepSymbol%%errorMessage%\e[48;5;237m+%indexAdded% ~%indexChanges% -%indexDeleted% \ ~%worktreeChanges% -%worktreeDeleted% ?%untracked% \e[48;5;136m↑%ahead%(b=darkred)↓%behind%%behindMessage%(rdc)
aheadTextTemplate string %bgColor%(f=white) %repoName% ├ %branch% %sepSymbol%%errorMessage%\e[48;5;237m+%indexAdded% ~%indexChanges% -%indexDeleted% \ ~%worktreeChanges% -%worktreeDeleted% ?%untracked% \e[48;5;136m↑%ahead%(rdc)
noDataTextTemplate string %bgColor%(f=white) %repoName% ├ %branch% %errorMessage%(rdc)
templateNoRepository string (b=darkblue)(f=white) » %errorMessage%(rdc)
behindBackgroundColor string (b=darkred)
aheadBackgroundColor string \e[48;5;136m
upToDateBackgroundColor string \e[48;5;22m
modifiedBackgroundColor string \e[48;5;130m
modifiedUntrackedBackgroundColor string \e[48;5;166m
unknownBackgroundColor string (b=darkblue)


Settings example

change behin background color, for example within user .profile script :

  1. set env.com.git.promptInfo.behindBackgroundColor (b=magenta)

Templates paramters

  • infoColor
  • behindColor
  • aheadColor
  • unknownBackgroundColor
  • bgColor
  • branch
  • errorMessage
  • indexAdded
  • indexChanges
  • indexDeleted
  • worktreeChanges
  • worktreeAdded
  • worktreeDeleted
  • untracked
  • repoName
  • behind
  • ahead
  • sepSymbol
  • behindMessage






Orbital Shell is a multi-plateform (windows, linux, macos, arm) command shell, inspired by bash and POSIX recommendations. It provides any usual bash shell feature (even if modernized) and nice syntaxes and features allowing to interact (get/set/call members) with C# objects. Developed using C# 8, .NET Core 3.1/Net 5 and .NET Standard 2.1