diff --git a/aliases/functions b/aliases/functions index 48aec8c..39f902e 100644 --- a/aliases/functions +++ b/aliases/functions @@ -201,7 +201,6 @@ svn() { } alias gitv='vim "$(git rev-parse --git-dir)/index" -c "Gitv --all" -c tabonly' -alias ipy=ipython3 #}}} diff --git a/aliases/void b/aliases/void index b8a3f72..511ef99 100644 --- a/aliases/void +++ b/aliases/void @@ -1,20 +1,11 @@ #!/bin/zsh -hashafter () { - local fname=$1 - eval " - function $fname() { - command $fname \"\$@\" - hash -r - } - " -} +grep -q "void" /etc/os-release || return hashafter xi hashafter xbps-install hashafter xbps-remove -grep -q "void" /etc/os-release || return alias xq="xbps-query -Rs" xqn() { @@ -72,3 +63,6 @@ sv-manage() { ;; esac } + +# renamed package binaries +alias ts=moreutils_ts diff --git a/zshrc b/zshrc index 1961405..71bbe7a 100644 --- a/zshrc +++ b/zshrc @@ -35,6 +35,19 @@ try-source() { fi done } + +# run hash -r after the given command. Useful for package manager commands that +# change installed packages +hashafter () { + local fname=$1 + eval " + function $fname() { + command $fname \"\$@\" + hash -r + } + " +} + exists() { command -v "$@" >/dev/null } function(){ @@ -66,12 +79,5 @@ if exists stack; then eval "$(stack --bash-completion-script stack)" fi -if exists pyenv; then - eval "$(pyenv init -)" - if pyenv commands | grep -q 'virtualenv'; then - eval "$(pyenv virtualenv-init -)" - fi -fi - exists todo && todo exists thefuck && eval $(thefuck --alias)