From 0749034911b1e28d4d9abba5472201972a5e37ce Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Tue, 12 Oct 1999 09:30:35 +0000 Subject: zsh-workers/8217 --- Completion/Base/_default | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'Completion/Base/_default') diff --git a/Completion/Base/_default b/Completion/Base/_default index 03bbfd49f..4fb0b36dd 100644 --- a/Completion/Base/_default +++ b/Completion/Base/_default @@ -1,21 +1,25 @@ #compdef -default- -# We first try the `compctl's. This is without first (-T) and default (-D) -# completion. If you want them add `-T' and/or `-D' to this command. -# If there is a `compctl' for the command we are working on, we return -# immediatly. If you want to use new style completion anyway, remove the -# `|| return'. Also, you may want to use new style completion if the -# `compctl' didn't produce any matches. In that case remove the `|| return' -# and insert the line `[[ compstate[nmatches] -eq 0 ]] || return' after -# `compcall'. +local expl -compcall || return 0 +# You can first try the `compctl's by uncommenting the `compcall' line +# below. +# This is without first (-T) and default (-D) completion. If you want +# them add `-T' and/or `-D' to this command. If there is a `compctl' +# for the command we are working on, we return immediatly. If you want +# to use new style completion anyway, remove the `|| return'. Also, +# you may want to use new style completion if the `compctl' didn't +# produce any matches. In that case remove the `|| return' and insert +# the line `[[ compstate[nmatches] -eq 0 ]] || return' after `compcall'. -_files && return +# compcall || return 0 + +_description expl file +_files "$expl[@]" && return # magicequalsubst allows arguments like =~/foo to do # file name expansion after the =. In that case, it's natural to # allow completion to handle file names after any equals sign. if [[ -o magicequalsubst ]] && compset -P 1 '*='; then - _files + _files "$expl[@]" fi -- cgit 1.4.1