about summary refs log tree commit diff
path: root/Completion/Core/compinstall
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-04-28 09:31:54 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-04-28 09:31:54 +0000
commitbcb9190ff95501972232dbd47f734a3a33d0323c (patch)
treeb40dfffb181fface2b8cbe4094f6b6d3814c8fc0 /Completion/Core/compinstall
parentb19f915a4f3a986bd48b32e16cda0ea2cb5acbe7 (diff)
downloadzsh-bcb9190ff95501972232dbd47f734a3a33d0323c.tar.gz
zsh-bcb9190ff95501972232dbd47f734a3a33d0323c.tar.xz
zsh-bcb9190ff95501972232dbd47f734a3a33d0323c.zip
10999: compinstall fixes
Diffstat (limited to 'Completion/Core/compinstall')
-rw-r--r--Completion/Core/compinstall14
1 files changed, 12 insertions, 2 deletions
diff --git a/Completion/Core/compinstall b/Completion/Core/compinstall
index 78579b9ec..ad266eb59 100644
--- a/Completion/Core/compinstall
+++ b/Completion/Core/compinstall
@@ -69,9 +69,19 @@ If you have some already defined by compinstall, edit the name of the
 file where these can be found.  Note that this will only work if they
 are exactly the form in which compinstall inserted them.  If you leave
 the line as it is, or empty, I won't search."
-  vared -ch -p 'file> ' newifile
-  [[ -z $newifile || $ifile = $newifile ]] && foundold=false
+  while true;  do
+    vared -ch -p 'file> ' newifile
+    if [[ -n $newifile && $ifile != $newifile ]]; then
+      if __ci_test_ifile $newifile; then
+        foundold=true
+	break
+      fi
+      print "I couldn't find any definitions there.  Edit a new filename, or
+leave the line blank to ignore it."
+    fi
+  done
 fi
+ifile=$newifile
 
 if [[ $foundold = true ]]; then
   sed -n "/^[   ]*$startline/,/^[       ]*$endline/p" $ifile |