Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 5865837

Browse files
committed
Add command word token.
1 parent f264c7e commit 5865837

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/monaco/PromptTheme.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ monaco.editor.defineTheme("upterm-prompt-theme", {
66
rules: [
77
{token: "string", foreground: colors.green.slice(1)},
88
{token: "string.invalid", foreground: colors.red.slice(1)},
9+
{token: "command-name", foreground: colors.green.slice(1)},
910
{token: "word", foreground: textColor.slice(1)},
1011
{token: "pipe", foreground: colors.yellow.slice(1)},
1112
{token: "semicolon", foreground: colors.yellow.slice(1)},

src/monaco/ShellLanguage.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ monaco.languages.setMonarchTokensProvider("shell", {
4242
regex: />/,
4343
action: {token: "output-redirection-symbol"},
4444
},
45+
{
46+
regex: /^@word/,
47+
action: {token: "command-name"},
48+
},
4549
{
4650
regex: /@word/,
4751
action: {token: "word"},

src/plugins/autocompletion_providers/Git.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const commitOptionsData: OptionData[] = [
5050
detail: "Use the given <msg> as the commit message. If multiple -m options are given, their values are\
5151
concatenated as separate paragraphs.",
5252
kind: monaco.languages.CompletionItemKind.Snippet,
53-
insertText: {value: "--message \"$0\""},
53+
insertText: {value: "--message \"${0:Commit message}\""},
5454
},
5555
{
5656
longFlag: "all",

0 commit comments

Comments
 (0)