From a9cd6964432b63124deffdaeb68a6d94b14ecfa9 Mon Sep 17 00:00:00 2001 From: Eugen Kuksa Date: Thu, 4 Dec 2014 16:35:03 +0100 Subject: [PATCH] Add external module bd. --- .gitmodules | 3 +++ modules/bd/Readme.md | 18 ++++++++++++++++++ modules/bd/external | 1 + modules/bd/init.zsh | 2 ++ 4 files changed, 24 insertions(+) create mode 100644 modules/bd/Readme.md create mode 160000 modules/bd/external create mode 100644 modules/bd/init.zsh diff --git a/.gitmodules b/.gitmodules index cb8f419e..13d5c087 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "modules/prompt/functions/pure"] path = modules/prompt/external/pure url = https://github.com/sindresorhus/pure.git +[submodule "modules/bd/external"] + path = modules/bd/external + url = https://github.com/Tarrasch/zsh-bd.git diff --git a/modules/bd/Readme.md b/modules/bd/Readme.md new file mode 100644 index 00000000..80adf98c --- /dev/null +++ b/modules/bd/Readme.md @@ -0,0 +1,18 @@ +# bd +Jump back to a specific directory, without doing `cd ../../..` + +This is simply [bd](https://github.com/Tarrasch/zsh-bd) ported to a prezto module. + +For further information, e.g. a usage animation, I refer to the [original repository](https://github.com/Tarrasch/zsh-bd). + +## Usage +```zsh +$ mkdir -p a/b/c/d +$ cd a/b/c/d +$ bd b +$ ls +c +``` + +## Acknowledgements +All credits go to [@Tarrasch](https://github.com/Tarrasch) for the zsh implementation of bd! diff --git a/modules/bd/external b/modules/bd/external new file mode 160000 index 00000000..73670e1f --- /dev/null +++ b/modules/bd/external @@ -0,0 +1 @@ +Subproject commit 73670e1f23dd7e094cfd3083425ee2cd6b938e07 diff --git a/modules/bd/init.zsh b/modules/bd/init.zsh new file mode 100644 index 00000000..c8d5b680 --- /dev/null +++ b/modules/bd/init.zsh @@ -0,0 +1,2 @@ +# Source module files. +source "${0:h}/external/bd.zsh" || return 1