<commit_before>[![Slack Room][slack-badge]][slack-link]

# pragmaprompt

A **pragmatic** `bash` prompt done by a [`fish-shell`](https://github.com/fish-shell/fish-shell) user!

* Lighweight and simple, _no bloat_.
* Fast, very much so.
* Code validated using [`bashate`](https://github.com/openstack-dev/bashate) and [`shellcheck`](https://github.com/koalaman/shellcheck).
* Compatible and quite `POSIX`.

Supports prompting:

* Username (in *warning red* if root)
* Timestamp of last command
* Return value of last command
* State of version control (powered by [`vcprompt`](https://bitbucket.org/gward/vcprompt))
* Active *Python* `virtualenv` or current version managed by [`pyenv`](https://github.com/yyuu/pyenv).

![pragmaprompt]

> Tested on *iTerm3 nightlies*.

## Installation

### Manually

Clone this repository or get the file somehow and put it at `~/.bash_prompt`.

Finally, include the file in your `.bashrc` **or** `.bash_profile`:

```
source "$HOME/.bash_prompt"
```

## Integration

While truly optional the following tool is supported:

* [`vcprompt`](https://bitbucket.org/gward/vcprompt) - *git*, *hg*, and *svn* info at low latencies
* [`pyenv`](https://github.com/yyuu/pyenv) - the currently activated *virtualenv* is shown - nice for *Python* hack*etc - otherwise maybe not.

On *OS X* *homebrew* can be used to get these:

```
brew install pyenv --HEAD
brew install vcprompt --HEAD
```

> Note: The *bitbucket* repo of `vcprompt` *homebrew* uses is one of the few actually being maintained.

## Terminal Settings

A recommandable and well-matching font:

* [Literation Mono](https://github.com/powerline/fonts/tree/master/LiberationMono)

[vcprompt]: https://bitbucket.org/gward/vcprompt
[pragmaprompt]: https://cloud.githubusercontent.com/assets/80815/15529646/1776807a-224f-11e6-8bf0-77c210919af1.png

## Have Fish?

If you tend to use [`fish-shell`](https://github.com/fish-shell/fish-shell) please check out the [`cyber-trance`](https://github.com/fishgretel/cyber-trance) theme for a similar approach.

[vcprompt]: https://bitbucket.org/gward/vcprompt
[pragmaprompt]: https://cloud.githubusercontent.com/assets/80815/15529646/1776807a-224f-11e6-8bf0-77c210919af1.png

<commit_msg>add teaser<commit_after># pragmaprompt

A **pragmatic** `bash` prompt done by a [`fish-shell`](https://github.com/fish-shell/fish-shell) user!

* Lighweight and simple, _no bloat_.
* Fast, very much so.
* Code validated using [`bashate`](https://github.com/openstack-dev/bashate) and [`shellcheck`](https://github.com/koalaman/shellcheck).
* Compatible and quite `POSIX`.

![pragmaprompt]

Supports prompting:

* Username (in *warning red* if root)
* Timestamp of last command
* Return value of last command
* State of version control (powered by [`vcprompt`](https://bitbucket.org/gward/vcprompt))
* Active *Python* `virtualenv` or current version managed by [`pyenv`](https://github.com/yyuu/pyenv).

> Tested on *iTerm3 nightlies*.

## Installation

### Manually

Clone this repository or get the file somehow and put it at `~/.bash_prompt`.

Finally, include the file in your `.bashrc` **or** `.bash_profile`:

```
source "$HOME/.bash_prompt"
```

## Integration

While truly optional the following tool is supported:

* [`vcprompt`](https://bitbucket.org/gward/vcprompt) - *git*, *hg*, and *svn* info at low latencies
* [`pyenv`](https://github.com/yyuu/pyenv) - the currently activated *virtualenv* is shown - nice for *Python* hack*etc - otherwise maybe not.

On *OS X* *homebrew* can be used to get these:

```
brew install pyenv --HEAD
brew install vcprompt --HEAD
```

> Note: The *bitbucket* repo of `vcprompt` *homebrew* uses is one of the few actually being maintained.

## Terminal Settings

A recommandable and well-matching font:

* [Literation Mono](https://github.com/powerline/fonts/tree/master/LiberationMono)

[vcprompt]: https://bitbucket.org/gward/vcprompt
[pragmaprompt]: https://cloud.githubusercontent.com/assets/80815/15529646/1776807a-224f-11e6-8bf0-77c210919af1.png

## Have Fish?

If you tend to use [`fish-shell`](https://github.com/fish-shell/fish-shell) please check out the [`cyber-trance`](https://github.com/fishgretel/cyber-trance) theme for a similar approach.

[vcprompt]: https://bitbucket.org/gward/vcprompt
[pragmaprompt]: https://cloud.githubusercontent.com/assets/80815/15548709/f25ecc38-22a9-11e6-9e9e-c2b6eca03ceb.gif


{'fraction_non_alphanumeric': 0.14834285714285714, 'fraction_numerical': 0.03245714285714286, 'mean_word_length': 4.85809906291834, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 28, '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': '5335932', 'n_tokens_mistral': 1649, 'n_tokens_neox': 1518, 'n_words': 392}