Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merging my bash_profile with this #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions bash_profile.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

source ~/.bash_include

#definitions
#======================================================================
RED="\[\e[0;31m\]"
Expand All @@ -26,12 +28,14 @@ function sha() {
#======================================================================
export CLICOLOR=1
export TERM=xterm-256color
export EDITOR=/usr/bin/vim
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which 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)"
Expand All @@ -41,8 +45,28 @@ alias drmi="docker rmi \$(docker images -q)"
#misc
#======================================================================
alias gs="git status";
alias gits='git status;'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

semicolon is in the wrong place

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\]: "