aboutsummaryrefslogtreecommitdiffstats
path: root/bash
diff options
context:
space:
mode:
authorjason2022-02-02 09:48:36 -0700
committerjason2022-02-02 09:48:36 -0700
commited8a4adfd6d7cc4c551d0f60e3e6445a542e3f6c (patch)
tree538f1a8b0d7c1f9b250117253bc91c058b3f22ff /bash
parent5f9e44bd20d1f0f93397f372b210b91d73e40927 (diff)
downloaddotfiles-ed8a4adfd6d7cc4c551d0f60e3e6445a542e3f6c.tar.gz
dotfiles-ed8a4adfd6d7cc4c551d0f60e3e6445a542e3f6c.zip
add homebrew bash completions
Diffstat (limited to 'bash')
-rw-r--r--bash/.bashrc37
1 files changed, 32 insertions, 5 deletions
diff --git a/bash/.bashrc b/bash/.bashrc
index f50023b..b8cf2b6 100644
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -1,10 +1,15 @@
1LC_ALL="en_US.UTF-8" 1LC_ALL="en_US.UTF-8"
2PS1="[\u@\[\e[38;5;148m\]\h\[\e[m\]:\[\e[36m\]\W\[\e[m\]\[\e[m\]]\[\e[m\]\$\[\e[m\] " 2PS1="[\u@\[\e[38;5;148m\]\h\[\e[m\]:\[\e[36m\]\W\[\e[m\]\[\e[m\]]\[\e[m\]\$\[\e[m\] "
3PATH="${HOME}/bin:${PATH}" 3PATH="${HOME}/bin:${HOME}/.local/bin:${PATH}"
4 4
5# Disable bash deprecation warning on OS X 5# Disable bash deprecation warning on OS X
6export BASH_SILENCE_DEPRECATION_WARNING=1 6export BASH_SILENCE_DEPRECATION_WARNING=1
7 7
8# Enable bash-completions for homebrew installed bash
9if [ -f /opt/homebrew/etc/bash_completion ]; then
10 . /opt/homebrew/etc/bash_completion
11fi
12
8# Enable flutter 13# Enable flutter
9if [ -d $HOME/bin/flutter/ ]; then 14if [ -d $HOME/bin/flutter/ ]; then
10 PATH="${HOME}/bin/flutter/bin:${PATH}" 15 PATH="${HOME}/bin/flutter/bin:${PATH}"
@@ -43,6 +48,12 @@ if [ -d /usr/local/go/bin ]; then
43 PATH=$PATH:/usr/local/go/bin 48 PATH=$PATH:/usr/local/go/bin
44fi 49fi
45 50
51# Enable docker completions
52if [ -d /Applications/Docker.app/Contents/Resources/etc/ ]; then
53 . /Applications/Docker.app/Contents/Resources/etc/docker-compose.bash-completion
54 . /Applications/Docker.app/Contents/Resources/etc/docker.bash-completion
55fi
56
46# Enable nix 57# Enable nix
47if [ -f $HOME/.nix-profile/etc/profile.d/nix.sh ]; then 58if [ -f $HOME/.nix-profile/etc/profile.d/nix.sh ]; then
48 source $HOME/.nix-profile/etc/profile.d/nix.sh 59 source $HOME/.nix-profile/etc/profile.d/nix.sh
@@ -63,21 +74,37 @@ if [ -x /opt/homebrew/bin/pyenv ]; then
63 eval "$(pyenv init -)" 74 eval "$(pyenv init -)"
64fi 75fi
65 76
77#######
78
66# Enable system bash completions 79# Enable system bash completions
67# Debian derivative 80
81## Debian derivative
68if [ -f /etc/bash_completion ]; then 82if [ -f /etc/bash_completion ]; then
69 . /etc/bash_completion 83 . /etc/bash_completion
70fi 84fi
85
86## FreeBSD
87[[ $PS1 && -f /usr/local/share/bash-completion/bash_completion.sh ]] && \
88 source /usr/local/share/bash-completion/bash_completion.sh
89
90#######
91
92# FZF
93
94## Debian
71if [ -f /usr/share/doc/fzf/examples/completion.bash ]; then 95if [ -f /usr/share/doc/fzf/examples/completion.bash ]; then
72 # For apt install fzf 96 # For apt install fzf
73 . /usr/share/doc/fzf/examples/completion.bash 97 . /usr/share/doc/fzf/examples/completion.bash
74 . /usr/share/doc/fzf/examples/key-bindings.bash 98 . /usr/share/doc/fzf/examples/key-bindings.bash
75fi 99fi
76 100
77# FreeBSD 101## OS X/homebrew
78[[ $PS1 && -f /usr/local/share/bash-completion/bash_completion.sh ]] && \ 102if [ -f /opt/homebrew/opt/fzf/shell/completion.bash ]; then
79 source /usr/local/share/bash-completion/bash_completion.sh 103 . /opt/homebrew/opt/fzf/shell/completion.bash
104 . /opt/homebrew/opt/fzf/shell/key-bindings.bash
105fi
80 106
107#######
81 108
82TERM="xterm-256color" 109TERM="xterm-256color"
83 110