[GH-ISSUE #273] Colorized bash prompt ignored ($PS1) #805

Closed
opened 2026-03-15 10:33:11 +03:00 by kerem · 3 comments
Owner

Originally created by @michael-o on GitHub (Mar 12, 2018).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/273

I have a colorized bash prompt:
PS1='[\033[01;32m]\u@\h[\033[0m]:[\033[01;34m]\w[\033[0m]$ '

When starting a recording, asciinema spits out:
$ asciinema rec git-tutorial/test-session2.cast
asciinema: recording asciicast to git-tutorial/test-session2.cast
asciinema: press or type "exit" when you're done
[\033[1;32m]\u@blnn719x[\033[0m]:[\033[1;34m]/net/home/osipovmi/public_html/protected[\033[0m]$ exit

Seems like bash prompts colors aren't supported?

Running asciinema 2.0.0 via FreeBSD ports. As well as "GNU bash, Version 4.4.19(0)-release (i386-portbld-freebsd10.4)".

Originally created by @michael-o on GitHub (Mar 12, 2018). Original GitHub issue: https://github.com/asciinema/asciinema/issues/273 I have a colorized bash prompt: PS1='\[\033[01;32m\]\u@\h\[\033[0m\]:\[\033[01;34m\]\w\[\033[0m\]\$ ' When starting a recording, asciinema spits out: $ asciinema rec git-tutorial/test-session2.cast asciinema: recording asciicast to git-tutorial/test-session2.cast asciinema: press <ctrl-d> or type "exit" when you're done \[\033[1;32m\]\u@blnn719x\[\033[0m\]:\[\033[1;34m\]/net/home/osipovmi/public_html/protected\[\033[0m\]$ exit Seems like bash prompts colors aren't supported? Running asciinema 2.0.0 via FreeBSD ports. As well as "GNU bash, Version 4.4.19(0)-release (i386-portbld-freebsd10.4)".
kerem closed this issue 2026-03-15 10:33:16 +03:00
Author
Owner

@michael-o commented on GitHub (Mar 12, 2018):

Seems like I am another idiot fooled by #22 and #53. While the FAQ contains this, it is not first hand clear that it applies to PS1. Can FAQ be improved?

<!-- gh-comment-id:372346412 --> @michael-o commented on GitHub (Mar 12, 2018): Seems like I am another idiot fooled by #22 and #53. While the FAQ contains [this](https://discourse.asciinema.org/t/why-am-i-getting-command-not-found-at-the-begining-of-the-recording-session/20), it is not first hand clear that it applies to `PS1`. Can FAQ be improved?
Author
Owner

@ku1ik commented on GitHub (Mar 12, 2018):

Yes, sure, I'll cover that in FAQ.

<!-- gh-comment-id:372385236 --> @ku1ik commented on GitHub (Mar 12, 2018): Yes, sure, I'll cover that in FAQ.
Author
Owner

@michael-o commented on GitHub (Apr 20, 2020):

Resolved via FAQ.

<!-- gh-comment-id:616521623 --> @michael-o commented on GitHub (Apr 20, 2020): Resolved via FAQ.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asciinema#805
No description provided.