From c9745b9e3a9bc5306e14779c9e91930123f574d4 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 27 Oct 2018 15:42:23 +0200 Subject: zshrc: Add cd-pkg alias Signed-off-by: Florian Pritz --- .zshrc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index 2ae57bb..03881f8 100644 --- a/.zshrc +++ b/.zshrc @@ -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 -- cgit v1.2.3-24-g4f1b