-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh(shell) Support multiline commands (#2861)
- Loading branch information
1 parent
3375ec6
commit c36d5ae
Showing
9 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -309,3 +309,4 @@ Contributors: | |
- Patrick Scheibe <[email protected]> | ||
- Kyle Brown <kylebrown9@github> | ||
- Marcus Ortiz <[email protected]> | ||
- Guillaume Grossetie <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,18 +3,21 @@ Language: Shell Session | |
Requires: bash.js | ||
Author: TSUYUSATO Kitsune <[email protected]> | ||
Category: common | ||
Audit: 2020 | ||
*/ | ||
|
||
/** @type LanguageFn */ | ||
export default function(hljs) { | ||
return { | ||
name: 'Shell Session', | ||
aliases: ['console'], | ||
contains: [ | ||
{ | ||
className: 'meta', | ||
begin: '^\\s{0,3}[/\\w\\d\\[\\]()@-]*[>%$#]', | ||
begin: /^\s{0,3}[/\w\d[\]()@-]*[>%$#]/, | ||
starts: { | ||
end: '$', subLanguage: 'bash' | ||
end: /[^\\](?=\s*$)/, | ||
subLanguage: 'bash' | ||
} | ||
} | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<span class="hljs-meta">$</span><span class="bash"> docker run \ | ||
--publish=7474:7474 --publish=7687:7687 \ | ||
--volume=/neo4j/data:/data \ | ||
--volume=/neo4j/plugins:/plugins \ | ||
--volume=/neo4j/conf:/conf \ | ||
--volume=/logs/neo4j:/logs \ | ||
--user=<span class="hljs-string">"<span class="hljs-subst">$(id -u neo4j)</span>:<span class="hljs-subst">$(id -g neo4j)</span>"</span> \ | ||
--group-add=<span class="hljs-variable">$groups</span> \ | ||
neo4j:3.4</span> | ||
<span class="hljs-meta">></span><span class="bash"> /bin/cat \.travis.yml\ | ||
-b | head -n1</span> | ||
1 language: node_js | ||
<span class="hljs-meta">></span><span class="bash"> <span class="hljs-built_in">echo</span> <span class="hljs-string">'hello'</span></span> | ||
hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
$ docker run \ | ||
--publish=7474:7474 --publish=7687:7687 \ | ||
--volume=/neo4j/data:/data \ | ||
--volume=/neo4j/plugins:/plugins \ | ||
--volume=/neo4j/conf:/conf \ | ||
--volume=/logs/neo4j:/logs \ | ||
--user="$(id -u neo4j):$(id -g neo4j)" \ | ||
--group-add=$groups \ | ||
neo4j:3.4 | ||
> /bin/cat \.travis.yml\ | ||
-b | head -n1 | ||
1 language: node_js | ||
> echo 'hello' | ||
hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<span class="hljs-meta">></span><span class="bash"> /bin/sh</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
> /bin/sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<span class="hljs-meta">$</span><span class="bash"> <span class="hljs-built_in">echo</span> <span class="hljs-string">"<span class="hljs-variable">$HOME</span>"</span> -n</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$ echo "$HOME" -n |