From 4ab73520446bbaf98bc1a6069710f44888551f7a Mon Sep 17 00:00:00 2001 From: sev Date: Fri, 5 Apr 2024 14:48:14 -0500 Subject: [PATCH] zshrc: update aliases --- etc/zsh/.zshrc | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/etc/zsh/.zshrc b/etc/zsh/.zshrc index 4a5a252..fd1f378 100644 --- a/etc/zsh/.zshrc +++ b/etc/zsh/.zshrc @@ -218,6 +218,7 @@ alias se=sudoedit # be paranoid alias cp='cp -ip' alias mv='mv -i' +# zsh zmv with noglob wildcards alias zm='noglob zmv -WiM' alias zc='noglob zmv -WiC' alias zl='noglob zmv -WiL' @@ -232,10 +233,7 @@ if [[ "$OSTYPE" =~ '^freebsd' ]] { alias rm='rm -i' } [[ -v commands[trash-put] ]] && alias t=trash-put -## py venv -alias va='source bin/activate' -alias vd=deactivate -## ps +# ps source ~/.local/bin/.check-busybox if [[ -v commands[pstree] ]] && ! check-busybox pstree; then # use pstree, but NOT busybox pstree because it kinda sucks @@ -263,6 +261,9 @@ if [[ "$(basename "$PAGER")" = "less" ]] { alias pa=$ps alias spa="sudo $ps" unset ps +## py venv +alias va='source bin/activate' +alias vd=deactivate ## git alias g=git alias gd='git diff' @@ -287,12 +288,22 @@ if [[ -v commands[zoxide] ]] { } alias cd..=up ## dotfiles -alias dfu='d=${$(echo -E - ~/.zshenv):P:h:h};GIT_DIR=$d/.git GIT_WORK_TREE=$d { - git pull && - git submodules init && - git submodules sync && - git submodules update +alias dfu=' function { + local d=${$(echo -E - ~/.zshenv):P:h:h} + local -x GIT_DIR=$d/.git GIT_WORK_TREE=$d + git pull && + git submodule init && + git submodule sync && + git submodule update }' +## nocorrect +# zsh doesnt really handle sudo very well, so ignore it +alias sudo='nocorrect sudo' +## docker compose +alias dcp='sudo docker compose pull' +alias dcu='sudo docker compose up -d' +alias dcr='sudo docker compose restart' +alias dcl='sudo docker compose logs -f' ### hooks autoload -Uz add-zsh-hook -- 2.47.0