<commit_before>#!/bin/bash

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# This adds the active git branch name to the prompt when you cd to a repository on the command line

function parse_git_branch_and_add_brackets {
    git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \[\1\]/'
}

if [ "$PS1" ]; then
    if [ "$BASH" ]; then
        if [ "`id -u`" -eq 0 ]; then
            export PS1='\[\033[1;31m\]${USER}@${HOSTNAME}\[\033[1;33m\]$(parse_git_branch_and_add_brackets) \[\033[1;34m\]${PWD/#$HOME/~} $\[\033[0m\] '
        else
            export PS1='\[\033[1;32m\]${USER}@${HOSTNAME}\[\033[1;33m\]$(parse_git_branch_and_add_brackets) \[\033[1;34m\]${PWD/#$HOME/~} $\[\033[0m\] '
        fi
    else
        if [ "`id -u`" -eq 0 ]; then
            PS1='# '<commit_msg>De-functioned, because it breaks apt-get(?!)<commit_after>#!/bin/bash

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# This adds the active git branch name to the prompt when you cd to a repository on the command line

# function parse_git_branch_and_add_brackets {
#     git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \[\1\]/'
# }

if [ "$PS1" ]; then
    if [ "$BASH" ]; then
        if [ "`id -u`" -eq 0 ]; then
            export PS1='\[\033[1;31m\]${USER}@${HOSTNAME}\[\033[1;33m\]`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \[\1\]/'` \[\033[1;34m\]${PWD/#$HOME/~} $\[\033[0m\] '
        else
            export PS1='\[\033[1;32m\]${USER}@${HOSTNAME}\[\033[1;33m\]`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \[\1\]/'` \[\033[1;34m\]${PWD/#$HOME/~} $\[\033[0m\] '
        fi
    else
        if [ "`id -u`" -eq 0 ]; then
            PS1='# '
{'fraction_non_alphanumeric': 0.25658263305322127, 'fraction_numerical': 0.06162464985994398, 'mean_word_length': 2.344569288389513, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1654061', 'n_tokens_mistral': 790, 'n_tokens_neox': 706, 'n_words': 172}