Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bash_kernel/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

$ cat dog.png | display
$ echo "<b>Dog</b>, not a cat." | displayHTML
$ echo "alert('It is known khaleesi\!');" | displayJS
$ echo "alert('It is known khaleesi\\!');" | displayJS

### Updating rich content cells

Expand Down
6 changes: 3 additions & 3 deletions bash_kernel/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ def _start_bash(self):
# replwrap seeing that as the next prompt, we'll embed the marker characters
# for invisible characters in the prompt; these show up when inspecting the
# environment variable, but not when bash displays the prompt.
ps1 = self.unique_prompt + u'\[\]' + ">"
ps2 = self.unique_prompt + u'\[\]' + "+"
ps1 = self.unique_prompt + u'\\[\\]' + ">"
ps2 = self.unique_prompt + u'\\[\\]' + "+"
prompt_change = u"PS1='{0}' PS2='{1}' PROMPT_COMMAND=''".format(ps1, ps2)
# Using IREPLWrapper to get incremental output
self.bashwrapper = IREPLWrapper(child, u'\$', prompt_change, self.unique_prompt,
self.bashwrapper = IREPLWrapper(child, u'\\$', prompt_change, self.unique_prompt,
extra_init_cmd="export PAGER=cat",
line_output_callback=self.process_output)
finally:
Expand Down