diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2010-02-25 02:36:31 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2010-02-25 02:36:32 +0100 |
commit | 5499ea846c0c18bda46388bc4cfbd8d652a1b2db (patch) | |
tree | cc02b2ca77259221594596bfbfab8117bb7837c7 | |
parent | 9d59f8bab76605b683bf84f6ae0d496b4cbf20d0 (diff) | |
download | dotfiles-5499ea846c0c18bda46388bc4cfbd8d652a1b2db.tar.gz dotfiles-5499ea846c0c18bda46388bc4cfbd8d652a1b2db.tar.bz2 dotfiles-5499ea846c0c18bda46388bc4cfbd8d652a1b2db.zip |
Defined 'cdu' in terms of 'open_ebuild'
Diffstat (limited to '')
-rw-r--r-- | .zsh/zshfunctions | 8 | ||||
-rw-r--r-- | .zsh/zshrc | 1 |
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 @@ -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' |