summaryrefslogtreecommitdiff
path: root/plugins/jump
diff options
context:
space:
mode:
authorLuiz Guilherme Fonseca Rosa <luizguilhermefr@gmail.com>2018-10-08 10:20:10 -0300
committerGitHub <noreply@github.com>2018-10-08 10:20:10 -0300
commited401bc55af2e5b08d1ff903111a65838473ad9d (patch)
tree621f7623dedf79dd9117a20e84c0997eac8217e3 /plugins/jump
parentc2113d7cc67e2865a4692918198fba27e8360fe5 (diff)
parent7b29684a3087c881f240ebb74bd387c69f0ffcc6 (diff)
downloadzsh-ed401bc55af2e5b08d1ff903111a65838473ad9d.tar.gz
zsh-ed401bc55af2e5b08d1ff903111a65838473ad9d.tar.bz2
zsh-ed401bc55af2e5b08d1ff903111a65838473ad9d.zip
Merge branch 'master' into master
Diffstat (limited to 'plugins/jump')
-rw-r--r--plugins/jump/README.md19
-rw-r--r--plugins/jump/jump.plugin.zsh2
2 files changed, 20 insertions, 1 deletions
diff --git a/plugins/jump/README.md b/plugins/jump/README.md
new file mode 100644
index 000000000..ed6415289
--- /dev/null
+++ b/plugins/jump/README.md
@@ -0,0 +1,19 @@
+# Jump plugin
+
+This plugin allows to easily jump around the file system by manually adding marks.
+Those marks are stored as symbolic links in the directory `$MARKPATH` (default `$HOME/.marks`)
+
+To use it, add `jump` to the plugins array in your zshrc file:
+
+```zsh
+plugins=(... jump)
+```
+
+## Commands
+
+| Command | Description |
+|----------------------|-------------------------------------------------------------------------------------------------|
+| `jump <mark-name>` | Jump to the given mark |
+| `mark [mark-name]` | Create a mark with the given name or with the name of the current directory if none is provided |
+| `unmark <mark-name>` | Remove the given mark |
+| `marks` | List the existing marks and the directories they point to |
diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh
index 168dfaba2..a19a86022 100644
--- a/plugins/jump/jump.plugin.zsh
+++ b/plugins/jump/jump.plugin.zsh
@@ -19,7 +19,7 @@ mark() {
MARK="$1"
fi
if read -q \?"Mark $PWD as ${MARK}? (y/n) "; then
- mkdir -p "$MARKPATH"; ln -s "$PWD" "$MARKPATH/$MARK"
+ mkdir -p "$MARKPATH"; ln -sfn "$PWD" "$MARKPATH/$MARK"
fi
}