Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Generated by dotfiles setup: Fri Jul 29 15:00:42 EDT 2016
- # -----
- zsh_directory_name_functions+=macports_directory_names
- macports_directory_names() {
- emulate -L zsh
- setopt EXTENDED_GLOB
- local -a match mbegin mend tmp
- typeset -ag reply
- case $1 in
- n)
- if [[ $2 != (#b)mp:(?*) ]]
- then
- return 1
- fi
- tmp=(~/Projects/MacPorts/{git,git-svn,svn}/trunk/$match[1](/N))
- if (( ${#tmp} > 0 ))
- then
- reply=($tmp[1])
- return 0
- fi
- if reply=("$(port dir $match[1])") 2>/dev/null
- then
- return 0
- fi
- ;;
- d)
- ;;
- c)
- # TODO: Implement completion.
- ;;
- esac
- #unset reply
- return 1
- }
- # vim: set filetype=zsh:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement