diff --git a/plugins/jump/README.md b/plugins/jump/README.md index 1b0ce68c0..6cf653cec 100644 --- a/plugins/jump/README.md +++ b/plugins/jump/README.md @@ -17,6 +17,7 @@ plugins=(... jump) | `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 | +| `getmark `| Get the full path of a mark | ## Key bindings diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index c2b21e92e..a0d687c5d 100644 --- a/plugins/jump/jump.plugin.zsh +++ b/plugins/jump/jump.plugin.zsh @@ -45,11 +45,16 @@ marks() { done } +function getmark { + LANG= command realpath "$MARKPATH/$1" 2>/dev/null || { command echo "No such mark: $1" >&2; return 1; } +} + _completemarks() { reply=("${MARKPATH}"/{,.}*(@N:t)) } compctl -K _completemarks jump compctl -K _completemarks unmark +compctl -K _completemarks getmark _mark_expansion() { setopt localoptions extendedglob