aboutsummaryrefslogtreecommitdiffstats
path: root/bash
diff options
context:
space:
mode:
authorjason2023-05-19 10:28:48 -0600
committerjason2023-05-19 10:28:48 -0600
commit95d4d7c0ffa90abec500de1547c91a540d0fb01d (patch)
tree424852e681c25a3840fe779015749a637f9342c7 /bash
parentdeea89de45de265d91676c24995baf53ce20eaad (diff)
downloaddotfiles-95d4d7c0ffa90abec500de1547c91a540d0fb01d.tar.gz
dotfiles-95d4d7c0ffa90abec500de1547c91a540d0fb01d.zip
add podman
Diffstat (limited to 'bash')
-rw-r--r--bash/.bashrc40
1 files changed, 31 insertions, 9 deletions
diff --git a/bash/.bashrc b/bash/.bashrc
index edd834d..9cca2ff 100644
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -18,11 +18,6 @@ if [[ -x $STARSHIP ]]; then
18 eval "$(starship init bash)" 18 eval "$(starship init bash)"
19fi 19fi
20 20
21# Enable bash-completions for homebrew installed bash
22if [ -f /opt/homebrew/etc/bash_completion ]; then
23 . /opt/homebrew/etc/bash_completion
24fi
25
26# Enable flutter 21# Enable flutter
27if [ -d $HOME/bin/flutter/ ]; then 22if [ -d $HOME/bin/flutter/ ]; then
28 PATH="${HOME}/bin/flutter/bin:${PATH}" 23 PATH="${HOME}/bin/flutter/bin:${PATH}"
@@ -61,8 +56,22 @@ if [ -d /usr/local/go/bin ]; then
61 PATH=$PATH:/usr/local/go/bin 56 PATH=$PATH:/usr/local/go/bin
62fi 57fi
63 58
64# Enable docker completions 59#######
65if [ -d /Applications/Docker.app/Contents/Resources/etc/ ]; then 60
61# Docker/Podman
62
63DOCKER_PATH=`which docker`
64PODMAN_PATH=`which podman`
65if [ -n $PODMAN_PATH ]; then
66 source <(podman completion bash)
67 # Enable docker if it's podman
68 if [ -z $DOCKER_PATH ]; then
69 alias docker=podman
70 fi
71fi
72
73# Enable docker completions on OS X
74if [ -n $DOCKER_PATH ] && [ -d /Applications/Docker.app/Contents/Resources/etc/ ]; then
66 # Docker for Mac seems to switch the filenames sometimes. 75 # Docker for Mac seems to switch the filenames sometimes.
67 if [ -f /Applications/Docker.app/Contents/Resources/etc/docker ]; then 76 if [ -f /Applications/Docker.app/Contents/Resources/etc/docker ]; then
68 . /Applications/Docker.app/Contents/Resources/etc/docker 77 . /Applications/Docker.app/Contents/Resources/etc/docker
@@ -72,17 +81,30 @@ if [ -d /Applications/Docker.app/Contents/Resources/etc/ ]; then
72 . /Applications/Docker.app/Contents/Resources/etc/docker-compose.bash-completion 81 . /Applications/Docker.app/Contents/Resources/etc/docker-compose.bash-completion
73fi 82fi
74 83
84#######
85
86# Nix
87
75# Enable nix 88# Enable nix
76if [ -f $HOME/.nix-profile/etc/profile.d/nix.sh ]; then 89if [ -f $HOME/.nix-profile/etc/profile.d/nix.sh ]; then
77 source $HOME/.nix-profile/etc/profile.d/nix.sh 90 source $HOME/.nix-profile/etc/profile.d/nix.sh
78fi 91fi
79 92
93#######
94
95# Homebrew
96
80# Enable Homebrew 97# Enable Homebrew
81if [ -x /opt/homebrew/bin/brew ]; then 98if [ -x /opt/homebrew/bin/brew ]; then
82 export HOMEBREW_NO_ANALYTICS=1 99 export HOMEBREW_NO_ANALYTICS=1
83 eval "$(/opt/homebrew/bin/brew shellenv)" 100 eval "$(/opt/homebrew/bin/brew shellenv)"
84fi 101fi
85 102
103# Enable bash-completions for homebrew installed bash
104if [ -f /opt/homebrew/etc/bash_completion ]; then
105 . /opt/homebrew/etc/bash_completion
106fi
107
86# Enable pyenv 108# Enable pyenv
87if [ -x /opt/homebrew/bin/pyenv ]; then 109if [ -x /opt/homebrew/bin/pyenv ]; then
88 # Prevent linking against system libpython when building 110 # Prevent linking against system libpython when building
@@ -154,8 +176,8 @@ alias e="${EDITOR}"
154 176
155# History settings 177# History settings
156#export HISTTIMEFORMAT="[%F %T] " 178#export HISTTIMEFORMAT="[%F %T] "
157export HISTSIZE=999999 # Store unlimited entries. Default: 500 179export HISTSIZE=99999 # Store unlimited entries. Default: 500
158export HISTFILESIZE= # Unlimited file size 180export HISTFILESIZE=-1 # Unlimited file size
159shopt -s histappend # append entries rather than overwrite 181shopt -s histappend # append entries rather than overwrite
160shopt -s cmdhist # Store multi-line commands as a single line 182shopt -s cmdhist # Store multi-line commands as a single line
161# Store history immediately 183# Store history immediately