From ce60a18c47e611f939cc58f0fd21ef890e95d2a0 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Sun, 13 Mar 2016 22:05:07 -0400 Subject: [PATCH] Added em function --- shells/zshrc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/shells/zshrc b/shells/zshrc index 23a6d27..1999daf 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -110,7 +110,24 @@ if test -f /etc/gentoo-release; then # Gentoo ins(){ echo "args: $*" - sudo zsh -c "emerge --autounmask-write -Aav $*" + # Beep, verbose, ask + sudo zsh -c "emerge --autounmask-write -Ava $*" + echo "\a" + } + # For emerging with absolute paths + em(){ + # Beep, verbose, ask + EMERGE_ARGS="-Ava" + X="" + for var in "$@" + do + if [[ "$var" =~ ^- ]]; then + EMERGE_ARGS="$EMERGE_ARGS $var" + else + X="$X =$var" + fi + done + sudo emerge $EMERGE_ARGS$X echo "\a" } update(){