Clean up bash init a bit

This commit is contained in:
Daniel Lundin 2017-05-04 22:55:33 +02:00
parent 6e57d76838
commit b115eb98e3
3 changed files with 25 additions and 10 deletions

View file

@ -1,6 +1,20 @@
function _src {
[ -f $1 ] && source $1
}
# Bash
_src /etc/bash_completion
# Bazel
[ -f /usr/local/lib/bazel/bin/bazel-complete.bash ] && source /usr/local/lib/bazel/bin/bazel-complete.bash
_src /usr/local/lib/bazel/bin/bazel-complete.bash
# Rust
[ -f /usr/local/etc/bash_completion.d/cargo ] && source /usr/local/etc/bash_completion.d/cargo
_src /usr/local/etc/bash_completion.d/cargo
# fzf
_src /usr/share/fzf/completion.bash
_src /usr/share/fzf/key-bindings.bash
# Kubernetes
source <(kubectl completion bash)

12
.bashrc
View file

@ -22,12 +22,6 @@ if [ -f "$HOME/.bash_completion_git" ] ; then
source ~/.bash_completion_git
fi
# Check for interactive shell.
if [ -n "$PS1" ]; then
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
unset bash bminor bmajor
# Bash settings
@ -110,9 +104,11 @@ tput smkx
#fi
#. /tmp/gpg-agent.env
source <(kubectl completion bash)
# Check for interactive shell.
if [ -n "$PS1" ]; then
source $HOME/.bash_completion
fi
source $HOME/.bash_aliases
source $HOME/.bash_exports
source $HOME/.bash_prompt
source $HOME/.bash_completion

View file

@ -287,6 +287,11 @@ au FileType xml
\ set makeprg=tidy\ -qe\ -access\ 3\ % |
\ set errorformat=line\ %l\ column\ %c\ \-\ %m
"" fzf
let g:fzf_layout = { 'up': '~40%' }
""
"" Color theme
""