diff options
author | Tristan Carel <tcarel@exalead.com> | 2011-10-10 14:54:20 +0200 |
---|---|---|
committer | Tristan Carel <tcarel@exalead.com> | 2011-10-10 14:54:20 +0200 |
commit | 7066bf7c6b522af9147ebf03c00361c4c6490d42 (patch) | |
tree | 876b4d1f57878a412fc11a27edffc5f396faca34 | |
parent | 574de93efbba22db0ec816ecec717d502dfa333e (diff) | |
download | zsh-7066bf7c6b522af9147ebf03c00361c4c6490d42.tar.gz zsh-7066bf7c6b522af9147ebf03c00361c4c6490d42.tar.bz2 zsh-7066bf7c6b522af9147ebf03c00361c4c6490d42.zip |
Fix builtin `ecd' when file path contains space characters.
-rw-r--r-- | plugins/emacs/emacs.plugin.zsh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/emacs/emacs.plugin.zsh b/plugins/emacs/emacs.plugin.zsh index 737abe9d6..e22f10740 100644 --- a/plugins/emacs/emacs.plugin.zsh +++ b/plugins/emacs/emacs.plugin.zsh @@ -31,13 +31,13 @@ if "$ZSH/tools/require_tool.sh" emacs 23 2>/dev/null ; then $EDITOR --eval "$cmd" | tr -d \" } - # display the directory of the file + # Write to standard output the directory of the file # opened in the the current buffer function ecd { local cmd="(let ((buf-name (buffer-file-name (window-buffer)))) (if buf-name (file-name-directory buf-name)))" - local dir=`$EDITOR --eval "$cmd" | tr -d \"` + local dir="$($EDITOR --eval $cmd | tr -d \")" if [ -n "$dir" ] ;then echo "$dir" else |