about summary refs log tree commit diff
path: root/Completion/Core
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2000-05-01 18:14:08 +0000
committerBart Schaefer <barts@users.sourceforge.net>2000-05-01 18:14:08 +0000
commit7e5ee56443e7f4da0f52887edbc7d5e9a54a35d4 (patch)
treed4220221ba31cb68128eb4d99a2df3a5c9615c07 /Completion/Core
parentbfa1e274341d5e40b7dc9d0fb6935b58ceb9adf0 (diff)
downloadzsh-7e5ee56443e7f4da0f52887edbc7d5e9a54a35d4.tar.gz
zsh-7e5ee56443e7f4da0f52887edbc7d5e9a54a35d4.tar.xz
zsh-7e5ee56443e7f4da0f52887edbc7d5e9a54a35d4.zip
don't fail on nonexistent ~/.nedit file.
Diffstat (limited to 'Completion/Core')
-rw-r--r--Completion/Core/_expand7
1 files changed, 4 insertions, 3 deletions
diff --git a/Completion/Core/_expand b/Completion/Core/_expand
index 1a96e654e..293ad3649 100644
--- a/Completion/Core/_expand
+++ b/Completion/Core/_expand
@@ -32,13 +32,14 @@ fi
 exp=("$word")
 
 # First try substitution. That weird thing spanning multiple lines
-# changes quoted spaces, tabs, and newlines into spaces.
+# changes quoted spaces, tabs, and newlines into spaces and protects
+# this function from aborting on parse errors in the expansion.
 
 { zstyle -s ":completion:${curcontext}:" substitute expr ||
   { [[ "$curcontext" = expand-word:* ]] && expr=1 } } &&
     [[ "${(e):-\$[$expr]}" -eq 1 ]] &&
-    exp=( "${(e)exp//\\[ 	
-]/ }" )
+    exp=( ${(f)"$(print -lR - ${(e)exp//\\[ 	
+]/ } 2>/dev/null)"} )
 
 # If the array is empty, store the original string again.