[GH-ISSUE #53] git branch parsing output error only in recording mode #647

Closed
opened 2026-03-15 06:26:43 +03:00 by kerem · 2 comments
Owner

Originally created by @gabrielstuff on GitHub (Feb 20, 2014).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/53

Hi !
This looks like a great tool, but I just met an issue, and I'm not able to find anything in the history.

So here it is : https://asciinema.org/a/7767. As you can see there is an error :

bash: parse_git_branch: command not found

So it is for sure connected to this line in my .bash_profile :

#Color branches
parse_git_branch() {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
}

PS1='\t:\[\033[0;32m\]\u\[\033[0m\]@\[\033[01;31m\]\w\[\033[1;35m\]$(parse_git_branch)\[\033[00m\] \$ ' 

Any hint would be appreciated.

Thanks

Originally created by @gabrielstuff on GitHub (Feb 20, 2014). Original GitHub issue: https://github.com/asciinema/asciinema/issues/53 Hi ! This looks like a great tool, but I just met an issue, and I'm not able to find anything in the history. So here it is : https://asciinema.org/a/7767. As you can see there is an error : `bash: parse_git_branch: command not found` So it is for sure connected to this line in my `.bash_profile` : ``` #Color branches parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/' } PS1='\t:\[\033[0;32m\]\u\[\033[0m\]@\[\033[01;31m\]\w\[\033[1;35m\]$(parse_git_branch)\[\033[00m\] \$ ' ``` Any hint would be appreciated. Thanks
kerem closed this issue 2026-03-15 06:26:58 +03:00
Author
Owner

@ku1ik commented on GitHub (Feb 20, 2014):

Hey @gabrielstuff, see issue #22.

<!-- gh-comment-id:35677881 --> @ku1ik commented on GitHub (Feb 20, 2014): Hey @gabrielstuff, see issue #22.
Author
Owner

@ku1ik commented on GitHub (Dec 18, 2014):

asciinema doesn't start login shell, it starts regular interactive shell by running /bin/bash. You can either:

  • move this function to .bashrc or,

  • record with asciinema rec -c "/bin/bash -l" or,

  • add the following setting to your ~/.asciinema/config file:

    [record]
    command="/bin/bash -l"

<!-- gh-comment-id:67459197 --> @ku1ik commented on GitHub (Dec 18, 2014): asciinema doesn't start login shell, it starts regular interactive shell by running `/bin/bash`. You can either: - move this function to `.bashrc` or, - record with `asciinema rec -c "/bin/bash -l"` or, - add the following setting to your `~/.asciinema/config` file: [record] command="/bin/bash -l"
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#647
No description provided.