about summary refs log tree commit diff
path: root/Completion/Core/_normal
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core/_normal')
-rw-r--r--Completion/Core/_normal7
1 files changed, 7 insertions, 0 deletions
diff --git a/Completion/Core/_normal b/Completion/Core/_normal
index 2b53e0b02..e8b5fc146 100644
--- a/Completion/Core/_normal
+++ b/Completion/Core/_normal
@@ -2,6 +2,13 @@
 
 local comp command cmd1 cmd2 pat val name i ret=1 _compskip="$_compskip"
 
+# If we get the option `-s', we don't reset `_compskip'. This ensures
+# that a value set in the function for the `-first-' context is kept,
+# but that we still use pattern functions when we were called form
+# another completion function.
+
+[[ "$1" = -s ]] || _compskip=''
+
 # Completing in command position? If not we set up `cmd1' and `cmd2' as
 # two strings we have to search in the completion definition arrays (e.g.
 # a path and the last path name component).