X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/blobdiff_plain/5437a0d2b352a5e15dd03dc65733aaeb5688f9d8..70c91a2239c52ca411b68f32d0845a1c14868d34:/etc/zsh/.zshrc diff --git a/etc/zsh/.zshrc b/etc/zsh/.zshrc index bd670c2..da69412 100644 --- a/etc/zsh/.zshrc +++ b/etc/zsh/.zshrc @@ -215,6 +215,14 @@ 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' +if [[ -v commands[grep] ]] { + [[ -v commands[fgrep] ]] || alias fgrep='grep -F' + [[ -v commands[egrep] ]] || alias fgrep='grep -E' +} +for x (cat cmp diff grep test update) { + [[ -v commands[zutils-z$x] ]] || alias z$x=zutils-z$x +} # be paranoid alias cp='cp -ip' alias mv='mv -i' @@ -264,6 +272,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 +298,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