From abd976e8a32e6d77a708e1f128c78d0e2edceff2 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 3 Dec 2012 11:41:26 +0900 Subject: [PATCH] add rc.py --- profile | 3 ++- rc.py | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 rc.py diff --git a/profile b/profile index 1b14c2c..843746d 100755 --- a/profile +++ b/profile @@ -9,7 +9,8 @@ export HOSTNAME export ENV=~/.shrc export PYTHONDOCS=/usr/share/doc/python/html/ export PYTHONPATH="${PYTHONPATH}:${HOME}/my/bin/py" -test -f "${HOME}/.pythonrc" && export PYTHONSTARTUP="${HOME}/.pythonrc" +test -f "${HOME}/.dotfiles/rc.py" && \ + export PYTHONSTARTUP="${HOME}/.dotfiles/rc.py" #export PYTHONPATH="~/.local/share/lib/python3.2/site-packages" __add_to_path(){ diff --git a/rc.py b/rc.py new file mode 100755 index 0000000..f1a9469 --- /dev/null +++ b/rc.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +try: + import readline +except ImportError: + print("Module readline not available.") + readline = None +else: + if "libedit" in readline.__doc__ : + readline.parse_and_bind("bind ^I rl_complete") + else : + readline.parse_and_bind("tab: complete")