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

Re: On the quoting of braces



[Peter Stephenson]
> This fixes _main_complete so it doesn't depend on ignore_close_braces
> being unset when run.  The option will be set in time to autoload any
> further completion function.
> 
> Index: Completion/Base/Core/_main_complete
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Completion/Base/Core/_main_complete,v
> retrieving revision 1.14
> diff -p -u -r1.14 _main_complete
> --- Completion/Base/Core/_main_complete	13 Dec 2011 17:43:01 -0000
> 	1.14
> +++ Completion/Base/Core/_main_complete	4 Jan 2012 17:15:53 -0000
> @@ -3,6 +3,10 @@
>  # The main loop of the completion code. This is what is called when 
>  # completion is attempted from the command line.
>  
> +# Note that this function is parsed before $_comp_setup is evaluated,
> +# so that it should make conservative assumptions about the setting
> +# of the various options that affect parsing.
> +
>  # In case non-standard separators are in use.
>  local IFS=$' \t\n\0'
>  
> @@ -52,9 +56,12 @@ if [[ ( "$tmp" = *pending(|[[:blank:]]*)
>  fi
>  
>  if [[ "$compstate[insert]" = tab* ]]; then
> -  { [[ "$tmp" = (|*[[:blank:]])(yes|true|on|1)(|[[:blank:]]*) ]] &&
> -    { [[ "$curcontext" != :* || -z "$compstate[vared]" ]] ||
> -        zstyle -t ":completion:vared${curcontext}:" insert-tab } } && return
>  0
> +  if [[ "$tmp" = (|*[[:blank:]])(yes|true|on|1)(|[[:blank:]]*) ]]; then
> +    if [[ "$curcontext" != :* || -z "$compstate[vared]" ]] ||
> +      zstyle -t ":completion:vared${curcontext}:" insert-tab; then
> +      return 0
> +    fi
> +  fi
>  
>    compstate[insert]="${compstate[insert]//tab /}"
>  fi
> 
> -- 
> Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
> Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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