diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2018-10-09 14:46:47 -0400 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2018-10-09 14:46:47 -0400 |
commit | 075160b86c64045e661209ad7906559068b44104 (patch) | |
tree | a910a6eef6163d39859395bb0b416b2b184db9ac /plugins/jump | |
parent | 5ece6ef2f07c58672a9c965dbbbb62a42386fb2d (diff) | |
parent | 3c9942c4884089b290ef750468b29419ca0de271 (diff) | |
download | zsh-075160b86c64045e661209ad7906559068b44104.tar.gz zsh-075160b86c64045e661209ad7906559068b44104.tar.bz2 zsh-075160b86c64045e661209ad7906559068b44104.zip |
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
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 } |