diff options
| author | jason | 2023-05-19 10:28:48 -0600 |
|---|---|---|
| committer | jason | 2023-05-19 10:28:48 -0600 |
| commit | 95d4d7c0ffa90abec500de1547c91a540d0fb01d (patch) | |
| tree | 424852e681c25a3840fe779015749a637f9342c7 /bash | |
| parent | deea89de45de265d91676c24995baf53ce20eaad (diff) | |
| download | dotfiles-95d4d7c0ffa90abec500de1547c91a540d0fb01d.tar.gz dotfiles-95d4d7c0ffa90abec500de1547c91a540d0fb01d.zip | |
add podman
Diffstat (limited to 'bash')
| -rw-r--r-- | bash/.bashrc | 40 |
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)" |
| 19 | fi | 19 | fi |
| 20 | 20 | ||
| 21 | # Enable bash-completions for homebrew installed bash | ||
| 22 | if [ -f /opt/homebrew/etc/bash_completion ]; then | ||
| 23 | . /opt/homebrew/etc/bash_completion | ||
| 24 | fi | ||
| 25 | |||
| 26 | # Enable flutter | 21 | # Enable flutter |
| 27 | if [ -d $HOME/bin/flutter/ ]; then | 22 | if [ -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 |
| 62 | fi | 57 | fi |
| 63 | 58 | ||
| 64 | # Enable docker completions | 59 | ####### |
| 65 | if [ -d /Applications/Docker.app/Contents/Resources/etc/ ]; then | 60 | |
| 61 | # Docker/Podman | ||
| 62 | |||
| 63 | DOCKER_PATH=`which docker` | ||
| 64 | PODMAN_PATH=`which podman` | ||
| 65 | if [ -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 | ||
| 71 | fi | ||
| 72 | |||
| 73 | # Enable docker completions on OS X | ||
| 74 | if [ -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 |
| 73 | fi | 82 | fi |
| 74 | 83 | ||
| 84 | ####### | ||
| 85 | |||
| 86 | # Nix | ||
| 87 | |||
| 75 | # Enable nix | 88 | # Enable nix |
| 76 | if [ -f $HOME/.nix-profile/etc/profile.d/nix.sh ]; then | 89 | if [ -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 |
| 78 | fi | 91 | fi |
| 79 | 92 | ||
| 93 | ####### | ||
| 94 | |||
| 95 | # Homebrew | ||
| 96 | |||
| 80 | # Enable Homebrew | 97 | # Enable Homebrew |
| 81 | if [ -x /opt/homebrew/bin/brew ]; then | 98 | if [ -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)" |
| 84 | fi | 101 | fi |
| 85 | 102 | ||
| 103 | # Enable bash-completions for homebrew installed bash | ||
| 104 | if [ -f /opt/homebrew/etc/bash_completion ]; then | ||
| 105 | . /opt/homebrew/etc/bash_completion | ||
| 106 | fi | ||
| 107 | |||
| 86 | # Enable pyenv | 108 | # Enable pyenv |
| 87 | if [ -x /opt/homebrew/bin/pyenv ]; then | 109 | if [ -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] " |
| 157 | export HISTSIZE=999999 # Store unlimited entries. Default: 500 | 179 | export HISTSIZE=99999 # Store unlimited entries. Default: 500 |
| 158 | export HISTFILESIZE= # Unlimited file size | 180 | export HISTFILESIZE=-1 # Unlimited file size |
| 159 | shopt -s histappend # append entries rather than overwrite | 181 | shopt -s histappend # append entries rather than overwrite |
| 160 | shopt -s cmdhist # Store multi-line commands as a single line | 182 | shopt -s cmdhist # Store multi-line commands as a single line |
| 161 | # Store history immediately | 183 | # Store history immediately |