diff options
author | Florian Pritz <bluewind@xinu.at> | 2018-10-27 15:42:23 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2018-10-27 15:42:23 +0200 |
commit | c9745b9e3a9bc5306e14779c9e91930123f574d4 (patch) | |
tree | f0b8bc871bfacace89e15ae7f9ed629e0990f172 | |
parent | 8da109c16ac6ba711b9755eadff78e190c7cf2fb (diff) | |
download | dotfiles-c9745b9e3a9bc5306e14779c9e91930123f574d4.tar.gz dotfiles-c9745b9e3a9bc5306e14779c9e91930123f574d4.tar.xz |
zshrc: Add cd-pkg alias
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | .zshrc | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -415,6 +415,18 @@ hgrep() { cat-history | mpgrep "$@" | less } +cd-pkg() { + local targets=(~/arch/{community,extra}) + local pkg=$1 + for target in "${targets[@]}"; do + if [[ -f "$target/$pkg/trunk/PKGBUILD" ]]; then + cd "$target/$pkg" + svn up + cd trunk + fi + done +} + # }}} # History {{{ HISTORYDIRECTORY=~/.zsh/history |