From ca45d510dd5fdd2cc1e92e969c95dbf7e31efb24 Mon Sep 17 00:00:00 2001 From: Rubén Durán Balda Date: Wed, 3 Oct 2018 16:19:46 +0200 Subject: jump: fix behavior when reusing a mark (#7197) Force the mark to point to the new dir, replacing the old one. Fixes #7195 --- plugins/jump/jump.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/jump') diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index 168dfaba2..5a3e7fdf0 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 -sfh "$PWD" "$MARKPATH/$MARK" fi } -- cgit v1.2.3-70-g09d2 From fe4ac966fab20f9f29c0a9905372b4b52083ef24 Mon Sep 17 00:00:00 2001 From: Jonatan Skogsfors Date: Wed, 3 Oct 2018 17:30:17 +0200 Subject: jump: use more compatible flag for ln (#7205) The flag '-h' isn't universal across implementation. According to FreeBSD man page for ln you can use 'n'. --- plugins/jump/jump.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/jump') diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index 5a3e7fdf0..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 -sfh "$PWD" "$MARKPATH/$MARK" + mkdir -p "$MARKPATH"; ln -sfn "$PWD" "$MARKPATH/$MARK" fi } -- cgit v1.2.3-70-g09d2 From ae548a99733d869f52efa36f146bd020a786a41e Mon Sep 17 00:00:00 2001 From: Rubén Durán Balda Date: Fri, 5 Oct 2018 20:23:30 +0200 Subject: jump: add README (#7237) --- plugins/jump/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugins/jump/README.md (limited to 'plugins/jump') 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 ` | 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 ` | Remove the given mark | +| `marks` | List the existing marks and the directories they point to | -- cgit v1.2.3-70-g09d2