-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshellconsole_style.py
More file actions
34 lines (29 loc) · 1.15 KB
/
shellconsole_style.py
File metadata and controls
34 lines (29 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""An example plugin style for Pygments."""
from pygments.style import Style
from pygments.token import Token, Punctuation, Whitespace, \
Text, Comment, Operator, Keyword, Name, String, Number, Generic
from pygments.styles.default import DefaultStyle
class ShellConsoleStyle(Style):
styles = DefaultStyle.styles.copy()
styles.update({
Generic.Prompt.UserHost: "#008000",
Generic.Prompt.Directory: "#19177C",
Generic.Prompt.GitBranch: "#767600",
Generic.Prompt.VirtualEnv: "#800000",
Token.Git.BranchLine: "#f00",
Token.Git.CommitHash: "#00f",
Token.Git.CommitDate: "#008000",
Token.Git.CommitMessage: "#FFFFFF",
Token.Git.CommitAuthor: "#aaaaaa",
Token.Git.Hint: "#aaaa00",
Token.Git.Refs: "#00ffff",
Token.Git.Refs.Tag: "#ffff00",
Token.Git.Refs.Head: "#00ffff",
Token.Git.Refs.Branch: "#00ff00",
Token.Git.Refs.RemoteHead: "#ffcc00",
Token.Git.Refs.RemoteBranch: "#ffcc00",
Token.Git.Untracked: "#f00",
Token.Git.Modified: "#f00",
Token.Git.Staged: "#008000",
})
del styles[Token.Generic.Prompt]