浏览代码

Plugin jump: autocompletion for numbers and dots

This change fixes the autocompletion for marks which contain numbers or dots.

Fixes #2578

`\d` in sed regular expressions doesn't work (see http://stackoverflow.com/questions/14671293/why-does-d-doesnt-work-in-regular-expression-in-sed)
Jannik Zschiesche 11 年之前
父节点
当前提交
75c02dd53e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/jump/jump.plugin.zsh

+ 1 - 1
plugins/jump/jump.plugin.zsh

@@ -39,7 +39,7 @@ marks() {
 
 
 _completemarks() {
 _completemarks() {
 	if [[ $(ls "${MARKPATH}" | wc -l) -gt 1 ]]; then
 	if [[ $(ls "${MARKPATH}" | wc -l) -gt 1 ]]; then
-		reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_\da-zA-Z\-]*):$/\2/g'))
+		reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_a-zA-Z0-9\.\-]*):$/\2/g'))
 	else
 	else
 		if readlink -e "${MARKPATH}"/* &>/dev/null; then
 		if readlink -e "${MARKPATH}"/* &>/dev/null; then
 			reply=($(ls "${MARKPATH}"))
 			reply=($(ls "${MARKPATH}"))