summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.zsh/zshfunctions8
-rw-r--r--.zsh/zshrc1
2 files changed, 3 insertions, 6 deletions
diff --git a/.zsh/zshfunctions b/.zsh/zshfunctions
index 9f0270e..72e455d 100644
--- a/.zsh/zshfunctions
+++ b/.zsh/zshfunctions
@@ -6,13 +6,9 @@ Start Stop Reload Restart ()
}
# Change to the directory of a specific package
-cdu ()
+_cdu ()
{
- local cp
-
- [[ -n $1 ]] && cp=$(eix -e $1 --format "<category>/<name>" 2>/dev/null | head -n1)
-
- cd /usr/portage/${cp}
+ cd $(dirname $1)
}
# Open the ebuild with a specified command
diff --git a/.zsh/zshrc b/.zsh/zshrc
index 2d25537..7855c24 100644
--- a/.zsh/zshrc
+++ b/.zsh/zshrc
@@ -28,6 +28,7 @@ alias e="eix -e"
alias i="eix -I"
alias ee='open_ebuild vim'
alias eeg='open_ebuild gvim'
+alias cdu='open_ebuild _cdu'
# misc
alias cdp='cd ~/dev/portato'