Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Re: _urls, _netscape, a seg fault and new completion thoughts



In article <199910141141.NAA13535@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
  Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:

> diff -u -r oldcompletion/Core/_main_complete Completion/Core/_main_complete
> --- oldcompletion/Core/_main_complete	Wed Oct 13 16:18:19 1999
> +++ Completion/Core/_main_complete	Thu Oct 14 13:38:04 1999

> @@ -55,6 +57,24 @@
>    "$post"
>  done
>  comppostfuncs=()
> +
> +_lastdescr=( "\`${(@)^_lastdescr:#}'" )
> +if [[ compstate[nmatches] -eq 0 &&
> +      -n "$compconfig[warning_format]" && $#_lastdescr -ne 0 ]]; then
> +  local str
> +
> +  compstate[list]=list
> +  compstate[force_list]=yes
> +  compstate[insert]=''
> +
> +  case $#_lastdescr in
> +  1) str="$_lastdescr[1]";;
> +  2) str="$_lastdescr[1] or $_lastdescr[2]";;
> +  *) str="${(j:, :)_lastdescr[1,-2]}, or $_lastdescr[-1]";;
> +  esac
> +
> +  compadd -UX "${compconfig[warning_format]//\\%d/$str}" -n ''
> +fi
>  
>  [[ "$compconfig[last_prompt]" = always ]] && compstate[last_prompt]=yes
>  

I couldn't apply this hunk. 

Z:akr@rascal% patch --dry-run -p0 < ../patchsrc/zsh-workers/8249
patching file Src/Zle/compctl.c
patching file Src/Zle/compctl.mdd
patching file Doc/Zsh/compctl.yo
patching file Doc/Zsh/compsys.yo
patching file Completion/Builtins/_nothing
patching file Completion/Core/_description
patching file Completion/Core/_files
patching file Completion/Core/_main_complete
Hunk #1 succeeded at 24 with fuzz 2.
Hunk #2 FAILED at 57.
1 out of 2 hunks FAILED -- saving rejects to file Completion/Core/_main_complete.rej
patching file Completion/Core/_message
patching file Completion/Core/_multi_parts
patching file Completion/Core/_path_files
patching file Completion/Core/_sep_parts
zsh: exit 1     patch --dry-run -p0 < ../patchsrc/zsh-workers/8249

I searched `comppostfuncs' in my zsh-workers archive, but a patch for
_main_complete which contains `comppostfuncs' was not found.

Z:akr@rascal% grep comppostfuncs ../patchsrc/zsh-workers/8???
../patchsrc/zsh-workers/8227:widgets. So I added the `comppostfuncs' array which is normally
../patchsrc/zsh-workers/8227:About this `comppostfuncs' business: some time ago we discussed ways
../patchsrc/zsh-workers/8227:what-we-have, the `comppostfuncs' array may look more useful.
../patchsrc/zsh-workers/8227:+functions whose names are given in the tt(comppostfuncs) array and
../patchsrc/zsh-workers/8227:+  comppostfuncs=( "$post[@]" )
../patchsrc/zsh-workers/8227:+    [[ "$twid" = "$wid" ]] && comppostfuncs=( "$post[@]" )
../patchsrc/zsh-workers/8249: comppostfuncs=()
Z:akr@rascal% 

Maybe, a patch for _main_complete was forgotten in 8227.
-- 
Tanaka Akira



Messages sorted by: Reverse Date, Date, Thread, Author