summaryrefslogtreecommitdiff
path: root/.zsh/zshfunctions
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2011-03-24 01:56:52 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2011-03-24 03:55:27 +0100
commit88b6f3d4f4a55ae046de0fb004671cc65db5a49d (patch)
tree292b4c44de417ada842fcbdc4969ba1f1d7da007 /.zsh/zshfunctions
parent5ac708a8d47752d57ede5b616357e961c77978e5 (diff)
downloaddotfiles-88b6f3d4f4a55ae046de0fb004671cc65db5a49d.tar.gz
dotfiles-88b6f3d4f4a55ae046de0fb004671cc65db5a49d.tar.bz2
dotfiles-88b6f3d4f4a55ae046de0fb004671cc65db5a49d.zip
Enhance the functions -- shadow local functions.
Diffstat (limited to '.zsh/zshfunctions')
-rw-r--r--.zsh/zshfunctions9
1 files changed, 6 insertions, 3 deletions
diff --git a/.zsh/zshfunctions b/.zsh/zshfunctions
index d0a5a64..317dd96 100644
--- a/.zsh/zshfunctions
+++ b/.zsh/zshfunctions
@@ -66,6 +66,8 @@ open_ebuild ()
# Works only for simple cases
cci ()
{
+ trap 'unfunction ask' EXIT
+
ask ()
{
echo -n "Is this ok? [y/n] "
@@ -165,6 +167,8 @@ menc()
# based on a script by mv
list_cc_flags()
{
+ trap 'unfunction Usage' EXIT
+
Usage ()
{
printf '%s\n' "Usage: ${0##*/} c|o [gcc-Flags e.g. -march=native -O2]
@@ -189,10 +193,9 @@ PROG
# set job count to 1 if there is only one package to install
emerge()
{
- local e=$(whence -p emerge)
if [[ $# < 3 ]]; then
- $e --jobs=1 $@
+ command emerge --jobs=1 $@
else
- $e $@
+ command emerge $@
fi
}