From 688d321af20dead0f73a1ed8e5f0ad314da91a39 Mon Sep 17 00:00:00 2001 From: Travis Swicegood Date: Thu, 6 Sep 2012 13:52:19 -0400 Subject: [PATCH 01/19] Add Django auto-complete support --- completion/available/django.completion.bash | 72 +++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100755 completion/available/django.completion.bash diff --git a/completion/available/django.completion.bash b/completion/available/django.completion.bash new file mode 100755 index 00000000..1c3887eb --- /dev/null +++ b/completion/available/django.completion.bash @@ -0,0 +1,72 @@ +# ######################################################################### +# This bash script adds tab-completion feature to django-admin.py and +# manage.py. +# +# Testing it out without installing +# ================================= +# +# To test out the completion without "installing" this, just run this file +# directly, like so: +# +# . ~/path/to/django_bash_completion +# +# Note: There's a dot ('.') at the beginning of that command. +# +# After you do that, tab completion will immediately be made available in your +# current Bash shell. But it won't be available next time you log in. +# +# Installing +# ========== +# +# To install this, point to this file from your .bash_profile, like so: +# +# . ~/path/to/django_bash_completion +# +# Do the same in your .bashrc if .bashrc doesn't invoke .bash_profile. +# +# Settings will take effect the next time you log in. +# +# Uninstalling +# ============ +# +# To uninstall, just remove the line from your .bash_profile and .bashrc. + +_django_completion() +{ + COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \ + COMP_CWORD=$COMP_CWORD \ + DJANGO_AUTO_COMPLETE=1 $1 ) ) +} +complete -F _django_completion -o default django-admin.py manage.py django-admin + +_python_django_completion() +{ + if [[ ${COMP_CWORD} -ge 2 ]]; then + PYTHON_EXE=$( basename -- ${COMP_WORDS[0]} ) + echo $PYTHON_EXE | egrep "python([2-9]\.[0-9])?" >/dev/null 2>&1 + if [[ $? == 0 ]]; then + PYTHON_SCRIPT=$( basename -- ${COMP_WORDS[1]} ) + echo $PYTHON_SCRIPT | egrep "manage\.py|django-admin(\.py)?" >/dev/null 2>&1 + if [[ $? == 0 ]]; then + COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]:1}" \ + COMP_CWORD=$(( COMP_CWORD-1 )) \ + DJANGO_AUTO_COMPLETE=1 ${COMP_WORDS[*]} ) ) + fi + fi + fi +} + +# Support for multiple interpreters. +unset pythons +if command -v whereis &>/dev/null; then + python_interpreters=$(whereis python | cut -d " " -f 2-) + for python in $python_interpreters; do + pythons="${pythons} $(basename -- $python)" + done + pythons=$(echo $pythons | tr " " "\n" | sort -u | tr "\n" " ") +else + pythons=python +fi + +complete -F _python_django_completion -o default $pythons + From e9f00c9af988a0f731ab5600f90c8ae5e2914259 Mon Sep 17 00:00:00 2001 From: Travis Swicegood Date: Wed, 19 Sep 2012 21:53:27 -0500 Subject: [PATCH 02/19] Add code to handle node_modules path --- plugins/available/node.plugin.bash | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 plugins/available/node.plugin.bash diff --git a/plugins/available/node.plugin.bash b/plugins/available/node.plugin.bash new file mode 100644 index 00000000..76027be7 --- /dev/null +++ b/plugins/available/node.plugin.bash @@ -0,0 +1,6 @@ +cite about-plugin +about-plugin 'Node.js helper functions' + +export PATH=./node_modules/.bin:$PATH + + From 5c0e1437d466ad4b2de6c4b606811b132139fe12 Mon Sep 17 00:00:00 2001 From: Travis Swicegood Date: Thu, 20 Sep 2012 15:36:54 -0500 Subject: [PATCH 03/19] Make sure that the npm prefix is in PATH --- plugins/available/node.plugin.bash | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/available/node.plugin.bash b/plugins/available/node.plugin.bash index 76027be7..06b158e7 100644 --- a/plugins/available/node.plugin.bash +++ b/plugins/available/node.plugin.bash @@ -3,4 +3,7 @@ about-plugin 'Node.js helper functions' export PATH=./node_modules/.bin:$PATH +# Make sure the global npm prefix is on the path +[[ `which npm` ]] && export PATH=$(npm config get prefix)/bin:$PATH + From 4261f3d8ecdc3e7cf400064d33907dc6f927b58b Mon Sep 17 00:00:00 2001 From: Nils Winkler Date: Tue, 13 Nov 2012 14:16:21 +0100 Subject: [PATCH 04/19] Added completion (show, help, enable, disable) for the bash-it function --- completion/available/bash-it.completion.bash | 135 +++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 completion/available/bash-it.completion.bash diff --git a/completion/available/bash-it.completion.bash b/completion/available/bash-it.completion.bash new file mode 100644 index 00000000..83ddfbc4 --- /dev/null +++ b/completion/available/bash-it.completion.bash @@ -0,0 +1,135 @@ +#!/usr/bin/env bash + +_bash-it-comp-enable-disable() +{ + local enable_disable_args="alias plugin completion" + COMPREPLY=( $(compgen -W "${enable_disable_args}" -- ${cur}) ) +} + +_bash-it-comp-list-available-not-enabled() +{ + subdirectory="$1" + + local available_things=$(for f in `ls -1 $BASH_IT/$subdirectory/available/*.bash`; + do + if [ ! -e $BASH_IT/$subdirectory/enabled/$(basename $f) ] + then + basename $f | cut -d'.' -f1 + fi + done) + + COMPREPLY=( $(compgen -W "all ${available_things}" -- ${cur}) ) +} + +_bash-it-comp-list-enabled() +{ + subdirectory="$1" + + local enabled_things=$(for f in `ls -1 $BASH_IT/$subdirectory/enabled/*.bash`; + do + basename $f | cut -d'.' -f1 + done) + + COMPREPLY=( $(compgen -W "all ${enabled_things}" -- ${cur}) ) +} + +_bash-it-comp-list-available() +{ + subdirectory="$1" + + local enabled_things=$(for f in `ls -1 $BASH_IT/$subdirectory/available/*.bash`; + do + basename $f | cut -d'.' -f1 + done) + + COMPREPLY=( $(compgen -W "${enabled_things}" -- ${cur}) ) +} + +_bash-it-comp() +{ + local cur prev opts prevprev + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + opts="help show enable disable" + + case "${prev}" in + show) + local show_args="plugins aliases completions" + COMPREPLY=( $(compgen -W "${show_args}" -- ${cur}) ) + return 0 + ;; + help) + local help_args="plugins aliases" + COMPREPLY=( $(compgen -W "${help_args}" -- ${cur}) ) + return 0 + ;; + enable) + _bash-it-comp-enable-disable + return 0 + ;; + disable) + _bash-it-comp-enable-disable + return 0 + ;; + aliases) + prevprev="${COMP_WORDS[COMP_CWORD-2]}" + + case "${prevprev}" in + help) + _bash-it-comp-list-available aliases + return 0 + ;; + esac + ;; + alias) + prevprev="${COMP_WORDS[COMP_CWORD-2]}" + + case "${prevprev}" in + enable) + _bash-it-comp-list-available-not-enabled aliases + return 0 + ;; + disable) + _bash-it-comp-list-enabled aliases + return 0 + ;; + esac + ;; + plugin) + prevprev="${COMP_WORDS[COMP_CWORD-2]}" + + case "${prevprev}" in + enable) + _bash-it-comp-list-available-not-enabled plugins + return 0 + ;; + disable) + _bash-it-comp-list-enabled plugins + return 0 + ;; + esac + ;; + completion) + prevprev="${COMP_WORDS[COMP_CWORD-2]}" + + case "${prevprev}" in + enable) + _bash-it-comp-list-available-not-enabled completion + return 0 + ;; + disable) + _bash-it-comp-list-enabled completion + return 0 + ;; + esac + ;; + esac + + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + + return 0 +} + +complete -F _bash-it-comp bash-it From 20b3d43c4bd8194fd3d4333ae392c755efb28112 Mon Sep 17 00:00:00 2001 From: Greg Nofi Date: Thu, 15 Nov 2012 10:14:45 -0500 Subject: [PATCH 05/19] Git Aliases: Remove duplicate darwin clause/add default clause for git diff. --- aliases/available/git.aliases.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aliases/available/git.aliases.bash b/aliases/available/git.aliases.bash index bbac313b..58411d81 100644 --- a/aliases/available/git.aliases.bash +++ b/aliases/available/git.aliases.bash @@ -35,7 +35,7 @@ case $OSTYPE in darwin*) alias gd='git diff | mate' ;; - darwin*) + *) alias gd='git diff' ;; esac From 8c4ea4f5988b7d758be9f891943b2d3cfd2639e5 Mon Sep 17 00:00:00 2001 From: Travis Swicegood Date: Thu, 15 Nov 2012 10:24:01 -0600 Subject: [PATCH 06/19] Add ability to override using $EDITOR --- aliases/available/git.aliases.bash | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/aliases/available/git.aliases.bash b/aliases/available/git.aliases.bash index 58411d81..75b8f65c 100644 --- a/aliases/available/git.aliases.bash +++ b/aliases/available/git.aliases.bash @@ -28,14 +28,18 @@ alias gdel='git branch -D' alias gmu='git fetch origin -v; git fetch upstream -v; git merge upstream/master' alias gll='git log --graph --pretty=oneline --abbrev-commit' -case $OSTYPE in - linux*) - alias gd='git diff | vim -R -' - ;; - darwin*) - alias gd='git diff | mate' - ;; - *) - alias gd='git diff' - ;; -esac +if [ -z "$EDITOR" ]; then + case $OSTYPE in + linux*) + alias gd='git diff | vim -R -' + ;; + darwin*) + alias gd='git diff | mate' + ;; + *) + alias gd='git diff' + ;; + esac +else + alias gd="git diff | $EDITOR" +fi From afe700fc0c3dee052db04645ccf62fadcc2ccc40 Mon Sep 17 00:00:00 2001 From: Travis Swicegood Date: Fri, 16 Nov 2012 11:00:30 -0600 Subject: [PATCH 07/19] Remove --no-site-packages as that is now the default behavior --- plugins/available/virtualenv.plugin.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/available/virtualenv.plugin.bash b/plugins/available/virtualenv.plugin.bash index 302e19d2..c2c2f915 100644 --- a/plugins/available/virtualenv.plugin.bash +++ b/plugins/available/virtualenv.plugin.bash @@ -11,7 +11,7 @@ function mkvenv { group 'virtualenv' cwd=`basename \`pwd\`` - mkvirtualenv --no-site-packages --distribute $cwd + mkvirtualenv --distribute $cwd } @@ -19,7 +19,7 @@ function mkvbranch { about 'create a new virtualenv for the current branch' group 'virtualenv' - mkvirtualenv --no-site-packages --distribute "$(basename `pwd`)@$(git_prompt_info)" + mkvirtualenv --distribute "$(basename `pwd`)@$(git_prompt_info)" } function wovbranch { From 2813930e0438261a2e3fc13d9b4f93ce421f4b71 Mon Sep 17 00:00:00 2001 From: Travis Swicegood Date: Fri, 16 Nov 2012 11:00:46 -0600 Subject: [PATCH 08/19] Add a wovenv to match mkvenv --- plugins/available/virtualenv.plugin.bash | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/available/virtualenv.plugin.bash b/plugins/available/virtualenv.plugin.bash index c2c2f915..93578395 100644 --- a/plugins/available/virtualenv.plugin.bash +++ b/plugins/available/virtualenv.plugin.bash @@ -28,3 +28,10 @@ function wovbranch { workon "$(basename `pwd`)@$(git_prompt_info)" } + +function wovenv { + about 'works on the virtualenv for this directory' + group 'virtualenv' + + workon "$(basename `pwd`)" +} From f93feb6e016195306113ce56f7cde7604aa5900f Mon Sep 17 00:00:00 2001 From: manojlds Date: Thu, 14 Feb 2013 10:38:12 +0530 Subject: [PATCH 09/19] Using $VIRTUAL_ENV to set virtualenv prompt --- themes/base.theme.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/base.theme.bash b/themes/base.theme.bash index f096fda4..18c6c9d4 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -137,8 +137,8 @@ function ruby_version_prompt { } function virtualenv_prompt { - if which virtualenv &> /dev/null; then - virtualenv=$([ ! -z "$VIRTUAL_ENV" ] && echo "`basename $VIRTUAL_ENV`") || return + if [[ -n "$VIRTUAL_ENV" ]]; then + virtualenv=`basename "$VIRTUAL_ENV"` echo -e "$VIRTUALENV_THEME_PROMPT_PREFIX$virtualenv$VIRTUALENV_THEME_PROMPT_SUFFIX" fi } From 1d1c57265c1d660e9e5c6e6f13d8cd7e1707fa08 Mon Sep 17 00:00:00 2001 From: Sebastian Pauka Date: Thu, 7 Mar 2013 10:17:01 +1100 Subject: [PATCH 10/19] Fixed ls alias to use --color=auto instead of --color=always. --- aliases/available/general.aliases.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aliases/available/general.aliases.bash b/aliases/available/general.aliases.bash index 3e87e2dc..c3aefe96 100644 --- a/aliases/available/general.aliases.bash +++ b/aliases/available/general.aliases.bash @@ -13,7 +13,7 @@ alias _="sudo" if [ $(uname) = "Linux" ] then - alias ls="ls --color=always" + alias ls="ls --color=auto" fi which gshuf &> /dev/null if [ $? -eq 1 ] From f2dcd4e759f2ca0b90a3c0a4f372b895b93a500e Mon Sep 17 00:00:00 2001 From: Fizer Khan Date: Sat, 9 Mar 2013 12:39:52 +0530 Subject: [PATCH 11/19] Added Jitsu aliases. --- aliases/available/jitsu.aliases.bash | 49 ++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 aliases/available/jitsu.aliases.bash diff --git a/aliases/available/jitsu.aliases.bash b/aliases/available/jitsu.aliases.bash new file mode 100644 index 00000000..91e96849 --- /dev/null +++ b/aliases/available/jitsu.aliases.bash @@ -0,0 +1,49 @@ +cite 'about-alias' +about-alias 'jitsu task abbreviations' + +# jitsu +alias j='jitsu' +alias jl='jitsu login' +alias jo='jitsu logout' + +# deploy and update +alias jd='jitsu apps deploy' +alias ju='jitsu apps update' + +# new and start, restart, stop +alias jn='jitsu apps create' +alias js='jitsu apps start' +alias jr='jitsu apps restart' +alias jx='jitsu apps stop' + +# logs +alias jll='jitsu logs' +alias jlog='jitsu logs' +alias jlogs='jitsu logs' + +# env +alias je='jitsu env' +alias jel='jitsu env list' +alias jes='jitsu env set' +alias jeg='jitsu env get' +alias jed='jitsu env delete' +alias jec='jitsu env clear' +alias jesv='jitsu env save' +alias jeld='jitsu env load' + +# configuration +alias jc='jitsu conf' +alias jcl='jitsu config list' +alias jcs='jitsu config set' +alias jcg='jitsu config get' +alias jcd='jitsu config delete' + +# list and install, view +alias jls='jitsu list' +alias jin='jitsu install' +alias jv='jitsu apps view' + +# Database, Snapshots and Tokens +alias jdb='jitsu databases' +alias jss='jitsu snapshots' +alias jto='jitsu tokens' From e9c9049b2285606da1a167a9d75b9c9fe1d1e24b Mon Sep 17 00:00:00 2001 From: Robbie Clutton Date: Sun, 10 Mar 2013 09:05:36 +0000 Subject: [PATCH 12/19] 'git pull --rebase' alias --- aliases/available/git.aliases.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/aliases/available/git.aliases.bash b/aliases/available/git.aliases.bash index 75b8f65c..40919f36 100644 --- a/aliases/available/git.aliases.bash +++ b/aliases/available/git.aliases.bash @@ -11,6 +11,7 @@ alias gst='git status' alias gs='git status' alias gss='git status -s' alias gl='git pull' +alias gpr='git pull --rebase' alias gup='git fetch && git rebase' alias gp='git push' alias gpo='git push origin' From 75dbdaf2742d874f8254cd908db36808eb890fe2 Mon Sep 17 00:00:00 2001 From: Dave Paroulek Date: Mon, 25 Mar 2013 08:36:27 -0400 Subject: [PATCH 13/19] Create plugins/enabled directory if it doesn't already exist - This fixes a bug I saw after installing bash-it on Mac OS X 10.6.8. During bash-it installation I chose not to install any plugins. After install, when `bash-it enable plugin foo` was complaining that the enabled directory did not exist. --- lib/helpers.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/helpers.bash b/lib/helpers.bash index e1787fe0..b99ae3d3 100644 --- a/lib/helpers.bash +++ b/lib/helpers.bash @@ -277,6 +277,8 @@ _enable-thing () return fi + mkdir -p $BASH_IT/$subdirectory/enabled + ln -s $BASH_IT/$subdirectory/available/$plugin $BASH_IT/$subdirectory/enabled/$plugin fi From 0cfec65383e542f165132c9f8983ebfb666f1b62 Mon Sep 17 00:00:00 2001 From: Mark Rickert Date: Tue, 9 Apr 2013 09:14:40 -0400 Subject: [PATCH 14/19] Added OSX utility shortcuts .DS_Store cleaner (recursive) See who's connected to your itunes library Flush dns cache. --- aliases/available/osx.aliases.bash | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/aliases/available/osx.aliases.bash b/aliases/available/osx.aliases.bash index e234727d..3d82b500 100644 --- a/aliases/available/osx.aliases.bash +++ b/aliases/available/osx.aliases.bash @@ -23,3 +23,12 @@ fi # Requires growlnotify, which can be found in the Growl DMG under "Extras" alias grnot='growlnotify -s -t Terminal -m "Done"' + +# Get rid of those pesky .DS_Store files recursively +alias dsclean='find . -type f -name .DS_Store -print0 | xargs -0 rm' + +# Track who is listening to your iTunes music +alias whotunes='lsof -r 2 -n -P -F n -c iTunes -a -i TCP@`hostname`:3689' + +# Flush your dns cache +alias flush='dscacheutil -flushcache' From 8be156fc8b3e1d5ebd2268781a91335fb6c850dd Mon Sep 17 00:00:00 2001 From: Mark Rickert Date: Tue, 9 Apr 2013 09:15:48 -0400 Subject: [PATCH 15/19] Added some awesome git aliases for statistics, history, and seeing what changed. --- aliases/available/git.aliases.bash | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aliases/available/git.aliases.bash b/aliases/available/git.aliases.bash index 75b8f65c..9a9a1060 100644 --- a/aliases/available/git.aliases.bash +++ b/aliases/available/git.aliases.bash @@ -11,6 +11,7 @@ alias gst='git status' alias gs='git status' alias gss='git status -s' alias gl='git pull' +alias gpp='git pull && git push' alias gup='git fetch && git rebase' alias gp='git push' alias gpo='git push origin' @@ -27,6 +28,10 @@ alias gexport='git archive --format zip --output' alias gdel='git branch -D' alias gmu='git fetch origin -v; git fetch upstream -v; git merge upstream/master' alias gll='git log --graph --pretty=oneline --abbrev-commit' +alias gg="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" +alias ggs="gg --stat" +alias gsl="git shortlog -sn" +alias gw="git whatchanged" if [ -z "$EDITOR" ]; then case $OSTYPE in From 70e4ac9e553c37a3595643c3cd3ebc22406e955b Mon Sep 17 00:00:00 2001 From: Conrado Buhrer Date: Wed, 10 Apr 2013 13:57:21 -0300 Subject: [PATCH 16/19] fixed: hg branch grep+awk problem #197 --- themes/base.theme.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/base.theme.bash b/themes/base.theme.bash index 18c6c9d4..5a5edd32 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -108,8 +108,8 @@ function hg_prompt_vars { fi SCM_PREFIX=${HG_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX} SCM_SUFFIX=${HG_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX} - SCM_BRANCH=$(hg summary 2> /dev/null | grep branch | awk '{print $2}') - SCM_CHANGE=$(hg summary 2> /dev/null | grep parent | awk '{print $2}') + SCM_BRANCH=$(hg summary 2> /dev/null | grep branch: | awk '{print $2}') + SCM_CHANGE=$(hg summary 2> /dev/null | grep parent: | awk '{print $2}') } function rvm_version_prompt { From 9dec4920237c4d40955789b66dbe72fa8e62c428 Mon Sep 17 00:00:00 2001 From: Sasha Gerrand Date: Wed, 24 Apr 2013 13:05:28 +1000 Subject: [PATCH 17/19] Adds write permission test on ~/.bash_profile prior to backup attempt. Fixes #199. --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 0f1da39c..46edcf22 100755 --- a/install.sh +++ b/install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash BASH_IT="$HOME/.bash_it" -cp $HOME/.bash_profile $HOME/.bash_profile.bak - -echo "Your original .bash_profile has been backed up to .bash_profile.bak" +test -w $HOME/.bash_profile && + cp $HOME/.bash_profile $HOME/.bash_profile.bak && + echo "Your original .bash_profile has been backed up to .bash_profile.bak" cp $HOME/.bash_it/template/bash_profile.template.bash $HOME/.bash_profile From ce5bb3d6eb85ccb919cf72d911b36bae2bc9736b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarjei=20Hus=C3=B8y?= Date: Wed, 1 May 2013 21:33:52 +0300 Subject: [PATCH 18/19] Fix typo in general.aliases.bash. --- aliases/available/general.aliases.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aliases/available/general.aliases.bash b/aliases/available/general.aliases.bash index c3aefe96..2439eb08 100644 --- a/aliases/available/general.aliases.bash +++ b/aliases/available/general.aliases.bash @@ -40,7 +40,7 @@ alias piano='pianobar' alias ..='cd ..' # Go up one directory alias ...='cd ../..' # Go up two directories -alias ....='cd ../../..' # Go up two directories +alias ....='cd ../../..' # Go up three directories alias -- -='cd -' # Go back # Shell History From b9f7a817a439397f50f922f5a206ebae6f487aa6 Mon Sep 17 00:00:00 2001 From: Ken Sheedlo Date: Wed, 22 May 2013 00:37:24 -0600 Subject: [PATCH 19/19] Add pip completion --- completion/available/pip.completion.bash | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 completion/available/pip.completion.bash diff --git a/completion/available/pip.completion.bash b/completion/available/pip.completion.bash new file mode 100644 index 00000000..ad3abb7e --- /dev/null +++ b/completion/available/pip.completion.bash @@ -0,0 +1,11 @@ + +# pip bash completion start +_pip_completion() +{ + COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \ + COMP_CWORD=$COMP_CWORD \ + PIP_AUTO_COMPLETE=1 $1 ) ) +} +complete -o default -F _pip_completion pip +# pip bash completion end +