merged
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 18 Oct 2011 19:32:34 +0300
changeset 230 2c6542befc32
parent 229 c351b7891093 (diff)
parent 228 b5a57a7abe40 (current diff)
child 231 84c9533f2675
merged
.bashrc
--- a/.bashrc	Mon Oct 17 22:30:59 2011 +0300
+++ b/.bashrc	Tue Oct 18 19:32:34 2011 +0300
@@ -154,6 +154,8 @@
   export INFOPATH=$INFOPATH:~/usr/share/info:
 fi
 
+export PYTHONSTARTUP=~/.pystartup
+
 ################################################################
 # Key binding.
 
--- a/.hgrc	Mon Oct 17 22:30:59 2011 +0300
+++ b/.hgrc	Tue Oct 18 19:32:34 2011 +0300
@@ -8,6 +8,8 @@
 editor = emacs -q
 ignore = ~/.hgignore
 
+style = ~/.hgstyle
+
 [defaults]
 log = -v -f
 incoming = -v
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgstyle	Tue Oct 18 19:32:34 2011 +0300
@@ -0,0 +1,25 @@
+changeset = 'changeset:   {rev}:{node|short}\n{branches}{bookmarks}{tags}{parents}user:        {author}\ndate:        {date|isodate}\nsummary:     {desc|firstline}\n\n'
+changeset_quiet = '{rev}:{node|short}\n'
+changeset_verbose = 'changeset:   {rev}:{node|short}\n{branches}{bookmarks}{tags}{parents}user:        {author}\ndate:        {date|isodate}\n{files}{file_copies_switch}description:\n{desc|strip}\n\n\n'
+changeset_debug = 'changeset:   {rev}:{node}\n{branches}{bookmarks}{tags}{parents}{manifest}user:        {author}\ndate:        {date|isodate}\n{file_mods}{file_adds}{file_dels}{file_copies_switch}{extras}description:\n{desc|strip}\n\n\n'
+start_files = 'files:      '
+file = ' {file}'
+end_files = '\n'
+start_file_mods = 'files:      '
+file_mod = ' {file_mod}'
+end_file_mods = '\n'
+start_file_adds = 'files+:     '
+file_add = ' {file_add}'
+end_file_adds = '\n'
+start_file_dels = 'files-:     '
+file_del = ' {file_del}'
+end_file_dels = '\n'
+start_file_copies = 'copies:     '
+file_copy = ' {name} ({source})'
+end_file_copies = '\n'
+parent = 'parent:      {rev}:{node|formatnode}\n'
+manifest = 'manifest:    {rev}:{node}\n'
+branch = 'branch:      {branch}\n'
+tag = 'tag:         {tag}\n'
+bookmark = 'bookmark:    {bookmark}\n'
+extra = 'extra:       {key}={value|stringescape}\n'
--- a/.inputrc	Mon Oct 17 22:30:59 2011 +0300
+++ b/.inputrc	Tue Oct 18 19:32:34 2011 +0300
@@ -87,6 +87,8 @@
 "\e[B": history-search-forward
 "\C-n": history-search-forward
 
+# Bind "Shift TAB" to complete as in Python TAB was need for another purpose.
+"\e[Z": complete
 # "	": menu-complete
 
 # Local Variables:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.pystartup	Tue Oct 18 19:32:34 2011 +0300
@@ -0,0 +1,35 @@
+# -*- mode: python -*-
+# Add auto-completion and a stored history file of commands to your Python
+# interactive interpreter. Requires Python 2.0+, readline. Autocomplete is
+# bound to the Esc key by default (you can change it - see readline docs).
+#
+# Store the file in ~/.pystartup, and set an environment variable to point
+# to it:  "export PYTHONSTARTUP=~/.pystartup" in bash.
+
+import os
+import sys
+import atexit
+import readline
+import rlcompleter
+
+historyPath = os.path.expanduser("~/.pyhistory")
+
+def save_history(historyPath=historyPath):
+    import readline
+    readline.write_history_file(historyPath)
+
+if os.path.exists(historyPath):
+    readline.read_history_file(historyPath)
+
+term_with_colors = ['xterm', 'xterm-color', 'xterm-256color', 'linux', 'screen', 'screen-256color', 'screen-bce']
+if os.environ.get('TERM') in term_with_colors:
+    green='\033[32m'
+    red='\033[31m'
+    reset='\033[0m'
+    sys.ps1 = red + '>>> ' + reset
+    sys.ps2 = green + '... ' + reset
+del term_with_colors
+
+atexit.register(save_history)
+del os, sys, atexit, readline, rlcompleter, save_history, historyPath
+
--- a/.vimrc	Mon Oct 17 22:30:59 2011 +0300
+++ b/.vimrc	Tue Oct 18 19:32:34 2011 +0300
@@ -11,7 +11,7 @@
 
 " A 256 color scheme.
 if &t_Co >= 256 || has("gui_running")
-  colorscheme inkpot
+  colorscheme delek
 endif
 
 set sessionoptions=curdir,buffers,tabpages
--- a/Makefile	Mon Oct 17 22:30:59 2011 +0300
+++ b/Makefile	Tue Oct 18 19:32:34 2011 +0300
@@ -27,10 +27,10 @@
 
 OVERRIDDEN_ITEMS = \
     .inputrc .minttyrc .Xdefaults .xinitrc .xserverrc .screenrc .dircolors \
-    .bashrc .bash_completion .zshrc .vimrc .ssh \
+    .bashrc .bash_completion .zshrc .vimrc .ssh .pystartup \
     .mailsign .muttrc .tidy \
     .dictrc \
-    .hgrc .hgignore .bazaar .gitconfig .gitignore .cvs \
+    .hgrc .hgignore .hgstyle .bazaar .gitconfig .gitignore .cvs \
     .gnupg
 MANUALINSTALL_ITEMS = .mc
 IFNONEXIST_ITEMS = .wgetrc .subversion