From c6cc0108ca7738023b45e0eeac0fa2390532dd93 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Fri, 25 Oct 2024 00:47:47 +0200 Subject: Added vendor lock on deps --- .../alecthomas/chroma/v2/lexers/bashsession.go | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/bashsession.go (limited to 'vendor/github.com/alecthomas/chroma/v2/lexers/bashsession.go') diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/bashsession.go b/vendor/github.com/alecthomas/chroma/v2/lexers/bashsession.go new file mode 100644 index 0000000..bea9393 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/bashsession.go @@ -0,0 +1,26 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma/v2" // nolint +) + +// BashSession lexer. +var BashSession = Register(MustNewLexer( + &Config{ + Name: "BashSession", + Aliases: []string{"bash-session", "console", "shell-session"}, + Filenames: []string{".sh-session"}, + MimeTypes: []string{"text/x-sh"}, + EnsureNL: true, + }, + bashsessionRules, +)) + +func bashsessionRules() Rules { + return Rules{ + "root": { + {`^((?:\[[^]]+@[^]]+\]\s?)?[#$%>])(\s*)(.*\n?)`, ByGroups(GenericPrompt, Text, Using("Bash")), nil}, + {`^.+\n?`, GenericOutput, nil}, + }, + } +} -- cgit v1.2.3