diff options
Diffstat (limited to 'Completion/Base/Utility/_contexts')
-rw-r--r-- | Completion/Base/Utility/_contexts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Completion/Base/Utility/_contexts b/Completion/Base/Utility/_contexts index 680f2019f..f0e5ba874 100644 --- a/Completion/Base/Utility/_contexts +++ b/Completion/Base/Utility/_contexts @@ -7,11 +7,17 @@ # `_contexts -math-' to get the completions that would be generated for a # mathematical context. -local i tmp ret=1 service +local i tmp ret=1 service or + +if [[ $1 = -o ]]; then + or=yes + shift +fi for i; do tmp="$_comps[$i]" - [[ -z "$tmp" ]] || service="${_services[$i]:-$i}" && "$tmp" && ret=0 + [[ -n "$tmp" ]] && service="${_services[$i]:-$i}" && eval "$tmp" && ret=0 + [[ -n "$or" && ret -eq 0 ]] && return 0 done return ret |