Download:
child 9:d83f081c6a41
parent 7:d3613e95e03f
8:86f2ec90bb93
Anton Shestakov <engored@ya.ru>, Thu, 08 Dec 2011 12:24:19 +0900
Docs.

4 файлов изменено, 100 вставок(+), 0 удалений(-) [+]
README.rst file | annotate | diff | comparison | revisions
docs/prompt-hg.png file | annotate | diff | comparison | revisions
docs/prompt.png file | annotate | diff | comparison | revisions
docs/prompt_screens.sh file | annotate | diff | comparison | revisions
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/README.rst Thu Dec 08 12:24:19 2011 +0900
@@ -0,0 +1,64 @@
+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
+--------------
+
+.. image:: https://bitbucket.org/engored/dotfiles/raw/tip/docs/prompt.png
+
+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
+----------------
+
+.. image:: https://bitbucket.org/engored/dotfiles/raw/tip/docs/prompt-hg.png
+
+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``. 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.
Binary file docs/prompt-hg.png has changed
Binary file docs/prompt.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/prompt_screens.sh Thu Dec 08 12:24:19 2011 +0900
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+set -x
+
+
+### MERCURIAL: PREPARE COMMIT GRAPH
+
+hg init /tmp/hgrepo && cd /tmp/hgrepo
+
+# revision 0
+echo "Haikus are easy" > poem && hg ci --addremove -m "First steps"
+
+# revision 1
+echo "Refrigerator" >> poem && hg ci -m "Progress!"
+
+# revision 2, another head
+hg up -r 0 && echo "But sometimes they don't make sense" >> poem && hg ci -m "How could I forget?"
+
+
+### MERCURIAL: DEMONSTRATE
+
+# clean repo at 2: minimal info
+hg up -r 2 -C && read
+
+# branch branch branch
+hg branch branch && read
+
+# dirty working directory
+echo "Roses are red" >> poem && read
+
+# clean, but not up-to-date repo at 1
+hg up -C -r 1 && read
+
+# merging
+hg merge && read
+