# Stuff worth explaining

## .bash_prompt

This file provides prompt_command function that is executed by the shell just before displaying PS1. This way user can redefine PS1 (or any of PS{1,4}, for that matter) to fit his/her needs. That's what I did exactly.

### Regular prompt

Note that the clock is not real-time. It updates after your shell command finishes (e.g. after you press enter). That's sufficient if you want to know how long your db backup took, for example.

Mercurial and Git support is disabled for root, thus two colored dashes.

### Mercurial prompt

It can be clearer, sure. But I'm used to this and I like it because it's taking so little space.

### Git prompt

No screenshot yet.

## .bash_aliases

This file contains aliases. Currently, the only alias that is not exactly self-explanatory is whatsopen. In short, it's an alternative to sockstat from FreeBSD. It shows listening (TCP) applications, like netstat -ntlp, but with a handy difference. It additionally shows users, so instead of this:

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:5984          0.0.0.0:*               LISTEN      30617/beam.smp


you get this:

COMMAND     PID    USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
beam.smp  30617 couchdb   16u  IPv4 7652760      0t0  TCP 127.0.0.1:5984 (LISTEN)


See? It's much easier to guess what beam.smp is when you know couchdb owns it. And it's much, much easier to understand what python2 is doing there when its owner is my-django-site-user or something.

## .bash_dconf2env

If you're using dconf (if you have Gnome 3 or some GTK+3 apps, you are) and want your system to use HTTP proxy server, put it in one place — your Gnome control center. Then just use this file and it'll set HTTP_PROXY and NO_PROXY for you.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.