diff options
Diffstat (limited to 'plugins/jump')
-rw-r--r-- | plugins/jump/README.md | 19 | ||||
-rw-r--r-- | plugins/jump/jump.plugin.zsh | 2 |
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 } |