From 444d01c2b37cbc541210b1e6ae1917567a88b86a Mon Sep 17 00:00:00 2001 From: James Thompson Date: Thu, 6 Apr 2017 09:41:32 -0400 Subject: [PATCH] merging my bash_profile with this --- bash_profile.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/bash_profile.sh b/bash_profile.sh index 07c9b69..02c208c 100644 --- a/bash_profile.sh +++ b/bash_profile.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +source ~/.bash_include + #definitions #====================================================================== RED="\[\e[0;31m\]" @@ -26,12 +28,14 @@ function sha() { #====================================================================== export CLICOLOR=1 export TERM=xterm-256color +export EDITOR=/usr/bin/vim #docker shortcuts #====================================================================== dssh() { docker exec -ti $1 /bin/bash } + alias drun="docker-compose run web" alias dash="docker-compose run web /bin/bash" alias dkill="docker kill \$(docker ps -q)" @@ -41,8 +45,28 @@ alias drmi="docker rmi \$(docker images -q)" #misc #====================================================================== alias gs="git status"; +alias gits='git status;' alias l="ls -lhaG"; alias dl="node ~/.daftlabs/src/main.js"; alias e="vim ." +#tab completing movement to code directory +#====================================================================== +function cdc() { + cd ~/code/$1 +} + +cdc() { + cd ~/code/$1 +} + +_cdc() { + local cur opts + cur="${COMP_WORDS[COMP_CWORD]}" + opts=$(cd ~/code ; ls -d *) + COMPREPLY=($(compgen -W "${opts}" -- ${cur})) +} + +complete -F _cdc cdc + PS1="$GREEN\u@\h$WHITE[\$(getTime)]$CYAN\$(ref)$PURPLE\$(sha)$BLUE\w\[\e[0m\]: "