<commit_before>prompty
=======

[![Build Status](https://travis-ci.org/ltn100/prompty.svg?branch=master)](https://travis-ci.org/ltn100/prompty)
[![Code Health](https://landscape.io/github/ltn100/prompty/master/landscape.png)](https://landscape.io/github/ltn100/prompty/master)
[![Coverage Status](https://coveralls.io/repos/ltn100/prompty/badge.svg?service=github)](https://coveralls.io/github/ltn100/prompty)

[![GitHub version](https://badge.fury.io/gh/ltn100%2Fprompty.svg)](http://badge.fury.io/gh/ltn100%2Fprompty)
[![MIT license](http://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
[![Badges](http://img.shields.io/badge/badges-shields.io-lightgrey.svg)](http://shields.io)

### Preparing for an [0.1 release](https://github.com/ltn100/prompty/issues?q=milestone%3Av0.1)!


What is prompty?
----------------

Prompty is a **command prompt markup language**.

What does that mean? Well, your [command prompt](https://en.wikipedia.org/wiki/Command-line_interface#Command_prompt) is the bit of text you see when you load up a Linux command terminal. It may look a bit like this:

    user@hostname $ █

The prompt you see will vary depending on the machine you are connected to, and who you are logged in as. By default, most machines will have a fairly simple prompt, designed to be unobtrusive to any user. This is all well and good, but what if you want to get more specific information from your prompt? what if your prompt could be customised and adapted to the way YOU use the machine? software developers may want different information from sys-admins. What if you could add colour? git branch names? CPU load? Traditionally, you would customise your prompt by setting a PS1 environment variable. For example, to create the prompt above, the PS1 variable would be set to something like this:

```bash
export PS1="\u@\h \$ "
```

At this point it is fairly easy to make minor changes, but the complexity escalates very quickly if you want to do anything like add colour or branch statements. Here is an example of a prompt that uses colour and gives the current git branch name:

```bash
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h \[\033[33;1m\]\w\[\033[m\] (\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)) \$ "
```

I think you'll agree that this is fairly impenetrable if it's the first time you'd seen it, and would take you a fair few minutes before you could start tweaking it to suit your needs. Perhaps what is needed is a *language* to describe, in easy-to-read terms, how the prompt is constructed?<commit_msg>Changed README links to develop<commit_after>prompty
=======

[![Build Status](https://travis-ci.org/ltn100/prompty.svg?branch=develop)](https://travis-ci.org/ltn100/prompty)
[![Code Health](https://landscape.io/github/ltn100/prompty/develop/landscape.png)](https://landscape.io/github/ltn100/prompty/develop)
[![Coverage Status](https://coveralls.io/repos/ltn100/prompty/badge.svg?service=github)](https://coveralls.io/github/ltn100/prompty)

[![GitHub version](https://badge.fury.io/gh/ltn100%2Fprompty.svg)](http://badge.fury.io/gh/ltn100%2Fprompty)
[![MIT license](http://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
[![Badges](http://img.shields.io/badge/badges-shields.io-lightgrey.svg)](http://shields.io)

### Preparing for an [0.1 release](https://github.com/ltn100/prompty/issues?q=milestone%3Av0.1)!


What is prompty?
----------------

Prompty is a **command prompt markup language**.

What does that mean? Well, your [command prompt](https://en.wikipedia.org/wiki/Command-line_interface#Command_prompt) is the bit of text you see when you load up a Linux command terminal. It may look a bit like this:

    user@hostname $ █

The prompt you see will vary depending on the machine you are connected to, and who you are logged in as. By default, most machines will have a fairly simple prompt, designed to be unobtrusive to any user. This is all well and good, but what if you want to get more specific information from your prompt? what if your prompt could be customised and adapted to the way YOU use the machine? software developers may want different information from sys-admins. What if you could add colour? git branch names? CPU load? Traditionally, you would customise your prompt by setting a PS1 environment variable. For example, to create the prompt above, the PS1 variable would be set to something like this:

```bash
export PS1="\u@\h \$ "
```

At this point it is fairly easy to make minor changes, but the complexity escalates very quickly if you want to do anything like add colour or branch statements. Here is an example of a prompt that uses colour and gives the current git branch name:

```bash
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h \[\033[33;1m\]\w\[\033[m\] (\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)) \$ "
```

I think you'll agree that this is fairly impenetrable if it's the first time you'd seen it, and would take you a fair few minutes before you could start tweaking it to suit your needs. Perhaps what is needed is a *language* to describe, in easy-to-read terms, how the prompt is constructed?
{'fraction_non_alphanumeric': 0.12951865455248404, 'fraction_numerical': 0.02435723951285521, 'mean_word_length': 4.463569165786695, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 18, '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': '154373', 'n_tokens_mistral': 1688, 'n_tokens_neox': 1557, 'n_words': 587}