X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/blobdiff_plain/4ab73520446bbaf98bc1a6069710f44888551f7a..b3d00f21714da838390b5778d6b32eb8baa01e55:/etc/zsh/.zshrc diff --git a/etc/zsh/.zshrc b/etc/zsh/.zshrc index fd1f378..229ade9 100644 --- a/etc/zsh/.zshrc +++ b/etc/zsh/.zshrc @@ -215,6 +215,7 @@ if [[ "$OSTYPE" =~ '^(free|net)bsd' ]] { alias p=\$PAGER alias e=\$EDITOR alias se=sudoedit +alias syncwatch='sync & watch -d grep -Fe Dirty: -e Writeback: /proc/meminfo' # be paranoid alias cp='cp -ip' alias mv='mv -i' @@ -264,6 +265,8 @@ unset ps ## py venv alias va='source bin/activate' alias vd=deactivate +alias vu="python3 -mvenv --upgrade" +alias svu="sudo python3 -mvenv --upgrade" ## git alias g=git alias gd='git diff' @@ -288,13 +291,13 @@ if [[ -v commands[zoxide] ]] { } alias cd..=up ## dotfiles -alias dfu=' function { - local d=${$(echo -E - ~/.zshenv):P:h:h} - local -x GIT_DIR=$d/.git GIT_WORK_TREE=$d +alias dfu='function { + pushd -q ${$(echo -E - ~/.zshenv):P:h:h} git pull && git submodule init && git submodule sync && git submodule update + popd -q }' ## nocorrect # zsh doesnt really handle sudo very well, so ignore it @@ -307,7 +310,7 @@ alias dcl='sudo docker compose logs -f' ### hooks autoload -Uz add-zsh-hook -_sev_exectime= +typeset -gi _sev_exectime function sev_preexec { # change terminal title to show command print -n "\e]2;$(print -P '%#')${SSH_CLIENT+$USER@$HOST:}$1\e\\"