|
|
@ -1,11 +1,56 @@ |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
#set -o vi |
|
|
|
#bind -m vi-insert "\C-l":clear-screen |
|
|
|
export PATH=~/go/bin:/snap/bin:/usr/sandbox/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin:$PATH |
|
|
|
|
|
|
|
set -o vi |
|
|
|
bind -m vi-insert "\C-l":clear-screen |
|
|
|
|
|
|
|
shopt -s extglob |
|
|
|
|
|
|
|
HISTSIZE= |
|
|
|
HISTFILESIZE= |
|
|
|
|
|
|
|
export EDITOR='nvim' |
|
|
|
|
|
|
|
export GIT_AUTHOR_NAME="Tovi Jaeschke-Rogers" |
|
|
|
export GIT_AUTHOR_EMAIL="tovi@tovijaeschke.xyz" |
|
|
|
export GIT_COMMITTER_NAME="Tovi Jaeschke-Rogers" |
|
|
|
export GIT_COMMITTER_EMAIL="tovi@tovijaeschke.xyz" |
|
|
|
|
|
|
|
export LESS='-R' |
|
|
|
export LESSOPEN='|~/.lessfilter %s' |
|
|
|
|
|
|
|
alias ls="ls --color=auto" \ |
|
|
|
vb='nvim ~/.bashrc && source ~/.bashrc' \ |
|
|
|
va='nvim ~/.config/aliasrc && source ~/.bashrc' |
|
|
|
|
|
|
|
if [[ $(uname) != "Linux" ]]; then |
|
|
|
|
|
|
|
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash" || true |
|
|
|
|
|
|
|
export HOMEBREW_NO_INSTALL_CLEANUP=1 |
|
|
|
|
|
|
|
export GIT_AUTHOR_EMAIL="tovi.jaeschke-rogers@thirty4.com" |
|
|
|
export GIT_COMMITTER_EMAIL="tovi.jaeschke-rogers@thirty4.com" |
|
|
|
|
|
|
|
alias ls="ls -G" \ |
|
|
|
vb='nvim ~/.bash_profile && source ~/.bash_profile' \ |
|
|
|
va='nvim ~/.config/aliasrc && source ~/.bash_profile' |
|
|
|
|
|
|
|
mount-hdd() { |
|
|
|
if [ -z $1 ]; then |
|
|
|
sudo umount /dev/disk2s1 && sudo /usr/local/bin/ntfs-3g /dev/disk2s1 /Volumes/NTFS -olocal -oallow_other |
|
|
|
else |
|
|
|
sudo umount /dev/$1 && sudo /usr/local/bin/ntfs-3g /dev/$1 /Volumes/NTFS -olocal -oallow_other |
|
|
|
fi |
|
|
|
} |
|
|
|
else |
|
|
|
|
|
|
|
aupdate() { |
|
|
|
sudo "apt update && apt upgrade" |
|
|
|
} |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
# set PATH so it includes user's private bin if it exists |
|
|
|
if [ -d "$HOME/.local/bin" ] ; then |
|
|
@ -14,12 +59,11 @@ fi |
|
|
|
|
|
|
|
source ~/.config/aliasrc |
|
|
|
|
|
|
|
|
|
|
|
parse_git_branch() { |
|
|
|
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' |
|
|
|
} |
|
|
|
|
|
|
|
export PS1="\[\033[0;35m\]\u\[\033[0;32m\]@\[\033[0;34m\]\h \[\033[32m\]\W\[\033[33m\]\$(parse_git_branch)\[\033[31m\] \n$\[\033[00m\] " |
|
|
|
export PS1=" \[\033[0;36m\]\t \[\033[0;35m\]\u\[\033[0;32m\]@\[\033[0;34m\]\h \[\033[32m\]\W\[\033[33m\]\$(parse_git_branch)\[\033[31m\] \n$\[\033[00m\] " |
|
|
|
|
|
|
|
mkcd() { |
|
|
|
if [ ! -d "$1" ]; then |
|
|
@ -44,10 +88,12 @@ git() { |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
# git branch -vv | grep 'gone\]' | awk ' { print $1 }' | xargs -p git branch -d |
|
|
|
git-prune() { |
|
|
|
if [[ $@ == "prune" ]]; then |
|
|
|
if [[ $@ == "--apply" ]]; then |
|
|
|
command git branch --merged develop | grep -vEw "develop$|master$" | xargs git branch -d |
|
|
|
else |
|
|
|
echo "Run \"git prune --apply\" to delete the following branches:" |
|
|
|
command git branch --merged develop | grep -vEw "develop$|master$" |
|
|
|
fi |
|
|
|
} |
|
|
@ -60,28 +106,11 @@ color-diff() { |
|
|
|
diff -bur $1 $2 | colordiff | less |
|
|
|
} |
|
|
|
|
|
|
|
export EDITOR='nvim' |
|
|
|
|
|
|
|
shopt -s extglob |
|
|
|
|
|
|
|
export GIT_AUTHOR_NAME="Tovi Jaeschke-Rogers" |
|
|
|
export GIT_AUTHOR_EMAIL="tovi.jaeschke-rogers@thirty4.com" |
|
|
|
export GIT_COMMITTER_NAME="Tovi Jaeschke-Rogers" |
|
|
|
export GIT_COMMITTER_EMAIL="tovi.jaeschke-rogers@thirty4.com" |
|
|
|
|
|
|
|
export NVM_DIR="$HOME/.nvm" |
|
|
|
export NVM_DIR="$HOME/.nvm" |
|
|
|
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm |
|
|
|
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" |
|
|
|
|
|
|
|
eval $(thefuck --alias) |
|
|
|
|
|
|
|
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash" || true |
|
|
|
|
|
|
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion |
|
|
|
|
|
|
|
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh" |
|
|
|
|
|
|
|
export LESS='-R' |
|
|
|
export LESSOPEN='|~/.lessfilter %s' |
|
|
|
|
|
|
|
export TMPDIR=/tmp |