Skip to content

Commit

Permalink
add python interpreter tab completion
Browse files Browse the repository at this point in the history
  • Loading branch information
cpdean committed May 5, 2014
1 parent 94df808 commit 06902dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bashrc
Expand Up @@ -122,6 +122,9 @@ if [ -f ~/.dotfiles/.git-completion.bash ]; then
. ~/.dotfiles/.git-completion.bash . ~/.dotfiles/.git-completion.bash
fi fi


# tab completion for python, and maybe other stuff
export PYTHONSTARTUP=~/.pythonrc

# virtualenvwrapper stuff # virtualenvwrapper stuff
export WORKON_HOME=$HOME/.virtualenvs export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/dev export PROJECT_HOME=$HOME/dev
Expand Down
8 changes: 8 additions & 0 deletions .pythonrc
@@ -0,0 +1,8 @@
# tab completion
try:
import readline
except ImportError:
print("readline not available. setting tab completion for python not possible")
else:
import rlcompleter
readline.parse_and_bind("tab:complete")

0 comments on commit 06902dd

Please sign in to comment.