Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

move pip completion; style tweaks

  • Loading branch information...
commit e91e7d6eb6d39ddfe4dff84ffc8fc4a7861fc417 1 parent 99aadbb
@adamv authored
Showing with 20 additions and 20 deletions.
  1. +7 −0 completion_scripts/pip_completion.bash
  2. +13 −20 dot.bashrc
View
7 completion_scripts/pip_completion.bash
@@ -0,0 +1,7 @@
+_pip_completion() {
+ COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \
+ COMP_CWORD=$COMP_CWORD \
+ PIP_AUTO_COMPLETE=1 $1 ) )
+}
+
+complete -o default -F _pip_completion pip
View
33 dot.bashrc
@@ -14,7 +14,7 @@ shopt -s histappend
# Put /usr/local/{sbin,bin} first
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
-# bin folders from ~, gems, and Homebrew examples
+# bin folders from ~, gems, and Homebrew
for another_bin in \
$HOME/bin \
$HOME/bin/extras \
@@ -31,24 +31,6 @@ done
[ -z "$PS1" ] && return
-## Python stuff
-export VIRTUALENV_USE_DISTRIBUTE
-
-venv=`which virtualenvwrapper.sh`
-[[ -n "$venv" ]] && {
- export WORKON_HOME=$HOME/env
- source $venv
-}
-
-
-function _pip_completion {
- COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \
- COMP_CWORD=$COMP_CWORD \
- PIP_AUTO_COMPLETE=1 $1 ) )
-}
-complete -o default -F _pip_completion pip
-
-
## Colors and ls
export LSCOLORS=hxfxcxdxbxegedabagHxHx
@@ -88,6 +70,17 @@ do
done
source ~/.dotfiles/completion_scripts/fab_completion.bash
+source ~/.dotfiles/completion_scripts/pip_completion.bash
+
+
+## Python stuff
+export VIRTUALENV_USE_DISTRIBUTE
+
+venv=`which virtualenvwrapper.sh`
+[[ -n "$venv" ]] && {
+ export WORKON_HOME=$HOME/env
+ source $venv
+}
## Custom prompt
@@ -232,4 +225,4 @@ function pgrep {
## Source any local additions
## (To keep work & home separate.)
-[[ -f ~/.bash_local ]] && . ~/.bash_local
+[[ -f ~/.bash_local ]] && source ~/.bash_local
Please sign in to comment.
Something went wrong with that request. Please try again.