diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 4eb3760..dd923ab 100755 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -42,7 +42,7 @@ cf() { dir="$(fd --ignore-file "${XDG_CONFIG_HOME}/fd_ignore" --print0 --type d -- "${@}" | fzf --read0 --select-1 --exit-0)" [[ -z "${dir}" ]] && return 1 - + if [[ -f "${dir}" ]]; then cd "${dir%/*}" else @@ -52,7 +52,7 @@ cf() { autoload -Uz cf -rgenv () { +rgenv() { if [[ -n $1 ]]; then env | rg --ignore-case $1 else @@ -60,6 +60,16 @@ rgenv () { fi } +# Update a docker container using docker compose +# Note: must be in the container directory +dockerupdate() { + docker compose down + until docker compose pull; do + docker compose pull + done + docker compose up -d +} + # Detect OS to autoload uncommon config files if [[ "$(uname)" =~ "Darwin" ]]; then for dotfile in "$XDG_CONFIG_HOME"/zsh-macos/*zsh*(.); do