summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Neumann <rene.neumann@in.tum.de>2012-10-17 11:02:13 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2012-10-17 11:02:13 +0200
commitd4613dbcd2e340d5bfc0f0c5a38df1aac2a32915 (patch)
tree97bc1f4f2666a182b6405cef40ef8629bd839bf0
parentc2b71d97ae13a17def29bf98aca48714142a889a (diff)
downloaddotfiles-d4613dbcd2e340d5bfc0f0c5a38df1aac2a32915.tar.gz
dotfiles-d4613dbcd2e340d5bfc0f0c5a38df1aac2a32915.tar.bz2
dotfiles-d4613dbcd2e340d5bfc0f0c5a38df1aac2a32915.zip
Add the kw() function
-rw-r--r--.zsh/zshfunctions19
-rw-r--r--.zsh/zshrc2
-rw-r--r--.zshenv3
3 files changed, 23 insertions, 1 deletions
diff --git a/.zsh/zshfunctions b/.zsh/zshfunctions
index ad50ea1..823a65b 100644
--- a/.zsh/zshfunctions
+++ b/.zsh/zshfunctions
@@ -82,3 +82,22 @@ emerge()
command emerge $@
fi
}
+
+# keyword a specific package using flaggie
+# relies on the $_kw variable set in .zshenv
+kw()
+{
+ if [[ -z $1 ]]; then
+ echo "Error: Need the package"
+ return 1
+ fi
+
+ if whence flaggie NOE; then
+ # use 'flaggie'
+ flaggie $1 "+$_kw"
+ else
+ echo "Error: flaggie not installed"
+ echo "Do it yourself!"
+ return 1
+ fi
+}
diff --git a/.zsh/zshrc b/.zsh/zshrc
index 14627d4..c01414a 100644
--- a/.zsh/zshrc
+++ b/.zsh/zshrc
@@ -31,7 +31,7 @@ alias la='ls -a'
alias man='LANG= man'
# emerge stuff
-alias AK='ACCEPT_KEYWORDS="~amd64"'
+alias AK=ACCEPT_KEYWORDS="$_kw" # _kw should be set in .zshenv
alias NS='FEATURES="nostrip" CFLAGS="-O0 -ggdb -pipe -march=native" CXXFLAGS="${CFLAGS}"'
alias e="eix -e"
alias i="eix -I"
diff --git a/.zshenv b/.zshenv
index 21c7a8c..f38c243 100644
--- a/.zshenv
+++ b/.zshenv
@@ -7,6 +7,9 @@ autoload ${fpath[1]}/*(:t)
[[ -d ~/bin ]] && path=(~/bin $path)
+# other variables
+_kw="~amd64"
+
# exports
export ECHANGELOG_USER="René Neumann (Necoro) <gentoo@necoro.eu>"
export EDITOR=vim