[GH-ISSUE #8] Git completion wc status in bash prompt not working #607

Closed
opened 2026-03-15 03:34:47 +03:00 by kerem · 2 comments
Owner

Originally created by @thedotedge on GitHub (Apr 4, 2012).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/8

I have git-completion enabled in my bash profile:

source ~/git-completion.bash
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWUPSTREAM="verbose"
# \$(parse_svn_revision)
export PS1="\[\033[1;30m\][\$(date +%H:%M)] \w \[\033[0m\]\$(__git_ps1 '(%s) ')\n\[\033[1;30m\]>\[\033[0m\] "

When I start recording a session, env variables seems to be inherited by the newly spawned shell, but not the function form git-completion:

bash: __git_ps1: command not found

ProductName: Mac OS X
ProductVersion: 10.7.3
BuildVersion: 11D50b

Originally created by @thedotedge on GitHub (Apr 4, 2012). Original GitHub issue: https://github.com/asciinema/asciinema/issues/8 I have git-completion enabled in my bash profile: ``` source ~/git-completion.bash export GIT_PS1_SHOWDIRTYSTATE=1 export GIT_PS1_SHOWUNTRACKEDFILES=1 export GIT_PS1_SHOWUPSTREAM="verbose" # \$(parse_svn_revision) export PS1="\[\033[1;30m\][\$(date +%H:%M)] \w \[\033[0m\]\$(__git_ps1 '(%s) ')\n\[\033[1;30m\]>\[\033[0m\] " ``` When I start recording a session, env variables seems to be inherited by the newly spawned shell, but not the function form git-completion: > bash: __git_ps1: command not found ProductName: Mac OS X ProductVersion: 10.7.3 BuildVersion: 11D50b
kerem closed this issue 2026-03-15 03:34:52 +03:00
Author
Owner

@ku1ik commented on GitHub (Apr 4, 2012):

I also noticed that few times. It seems that asciiio should invoke "/bin/bash -l" (login shell) instead of "/bin/bash". I'll check if it has any downsides, meanwhile you can try recording like this:

$ asciiio -c "/bin/bash -l"
<!-- gh-comment-id:4952186 --> @ku1ik commented on GitHub (Apr 4, 2012): I also noticed that few times. It seems that asciiio should invoke "/bin/bash -l" (login shell) instead of "/bin/bash". I'll check if it has any downsides, meanwhile you can try recording like this: ``` $ asciiio -c "/bin/bash -l" ```
Author
Owner

@ku1ik commented on GitHub (Oct 11, 2012):

I'm considering some general solution to your problem in #22.

<!-- gh-comment-id:9355379 --> @ku1ik commented on GitHub (Oct 11, 2012): I'm considering some general solution to your problem in #22.
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#607
No description provided.