wd.plugin.zsh 390 B

123456789101112131415
  1. #!/bin/zsh
  2. # WARP DIRECTORY
  3. # ==============
  4. # Jump to custom directories in terminal
  5. # because `cd` takes too long...
  6. #
  7. # @github.com/mfaerevaag/wd
  8. # Handle $0 according to the standard:
  9. # https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
  10. 0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
  11. 0="${${(M)0:#/*}:-$PWD/$0}"
  12. eval "wd() { source '${0:A:h}/wd.sh' }"