Advertisement
Guest User

Untitled

a guest
Jul 29th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. # Generated by dotfiles setup: Fri Jul 29 15:00:42 EDT 2016
  2. # -----
  3.  
  4. zsh_directory_name_functions+=macports_directory_names
  5.  
  6. macports_directory_names() {
  7. emulate -L zsh
  8. setopt EXTENDED_GLOB
  9. local -a match mbegin mend tmp
  10. typeset -ag reply
  11. case $1 in
  12. n)
  13. if [[ $2 != (#b)mp:(?*) ]]
  14. then
  15. return 1
  16. fi
  17. tmp=(~/Projects/MacPorts/{git,git-svn,svn}/trunk/$match[1](/N))
  18. if (( ${#tmp} > 0 ))
  19. then
  20. reply=($tmp[1])
  21. return 0
  22. fi
  23. if reply=("$(port dir $match[1])") 2>/dev/null
  24. then
  25. return 0
  26. fi
  27. ;;
  28. d)
  29. ;;
  30. c)
  31. # TODO: Implement completion.
  32. ;;
  33. esac
  34. #unset reply
  35. return 1
  36. }
  37.  
  38. # vim: set filetype=zsh:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement