From 2d1881c4660d012a0cb0c2c98a4a4cdf07f5ba5c Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Tue, 7 Oct 2014 23:53:06 -0400 Subject: [PATCH] Revert "[#129, #211] Remove z" This reverts commit b967c50fafa778b8e208bf2e28d4477195ff5027. --- .gitmodules | 3 +++ modules/z/README.md | 21 +++++++++++++++++++++ modules/z/external | 1 + modules/z/init.zsh | 19 +++++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 modules/z/README.md create mode 160000 modules/z/external create mode 100644 modules/z/init.zsh diff --git a/.gitmodules b/.gitmodules index 7a7a7b5..a898a30 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "modules/completion/external"] path = modules/completion/external url = https://github.com/zsh-users/zsh-completions.git +[submodule "modules/z/external"] + path = modules/z/external + url = https://github.com/rupa/z.git diff --git a/modules/z/README.md b/modules/z/README.md new file mode 100644 index 0000000..e17aa0e --- /dev/null +++ b/modules/z/README.md @@ -0,0 +1,21 @@ +Z += + +Integrates [z][1] into Prezto, which maintains a frequently used directory +list for fast directory changes. + +Aliases +------- + + - `j` changes the current working directory to the most *frecent* match. + +Authors +------- + +*The authors of this module should be contacted via the [issue tracker][2].* + + - [Sorin Ionescu](https://github.com/sorin-ionescu) + +[1]: https://github.com/rupa/z +[2]: https://github.com/sorin-ionescu/prezto/issues + diff --git a/modules/z/external b/modules/z/external new file mode 160000 index 0000000..9bf5feb --- /dev/null +++ b/modules/z/external @@ -0,0 +1 @@ +Subproject commit 9bf5feb86ac05ad32cd8fbf46d459eb415eed749 diff --git a/modules/z/init.zsh b/modules/z/init.zsh new file mode 100644 index 0000000..df1e570 --- /dev/null +++ b/modules/z/init.zsh @@ -0,0 +1,19 @@ +# +# Maintains a frequently used directory list for fast directory changes. +# +# Authors: +# Sorin Ionescu +# + +# Set the directory changing command. +_Z_CMD='j' + +# Prevent symbolic link resolution. +_Z_NO_RESOLVE_SYMLINKS=1 + +# Source module files. +source "${0:h}/external/z.sh" + +# Cleanup. +unset _Z_{CMD,NO_RESOLVE_SYMLINKS} +