zsh-workers
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org
Subject: Re: zle messes up 'words' variable?
Date: Tue, 3 May 2011 20:41:55 +0300	[thread overview]
Message-ID: <BANLkTim9YUZh8YMfvFxWqJnHHC6UtMaLag@mail.gmail.com> (raw)
In-Reply-To: <110503080432.ZM15979@torch.brasslantern.com>

On Tue, May 3, 2011 at 6:04 PM, Bart Schaefer <schaefer@brasslantern.com> wrote:
> On May 3,  7:39am, Bart Schaefer wrote:
> }
> } ... bashcompinit has responsibility
> } for loading the bash completion functions in a way that makes them
> } compatible.  That's not the same as first loading bashcompinit and
> } then independently defining a new completion, though I lean toward
> } the conclusion that use of the bash-compatible "complete" command is
> } probably the correct place to fix this if it can be managed.
>
> Try this:
>
> Index: Completion/bashcompinit
> ===================================================================
> diff -c -r1.2 bashcompinit
> --- Completion/bashcompinit     22 Jun 2004 07:53:03 -0000      1.2
> +++ Completion/bashcompinit     3 May 2011 15:01:09 -0000
> @@ -120,7 +120,13 @@
>       ;;
>       F)
>         COMPREPLY=()
> -       $OPTARG "${words[0]}" "${words[CURRENT-1]}" "${words[CURRENT-2]}"
> +        (){
> +          set -- "${words[0]}" "${words[CURRENT-1]}" "${words[CURRENT-2]}"
> +          # There may be more things we need to add to this typeset to
> +          # protect bash functions from compsys special variable names
> +          typeset -h words
> +          $OPTARG "$@"
> +        }
>        results+=( "${COMPREPLY[@]}" )
>       ;;
>       G)

Yeap, that fixes it :)

So I think this should be committed to zsh. Now, that's part a of the problem.

Part b is how to workaround the issue in the current versions of zsh,
which is what the git guys are trying to do:
http://article.gmane.org/gmane.comp.version-control.git/172371

I guess simply setting 'typeset -h words' on the top-level function
(_git) should do the trick.

Cheers.

-- 
Felipe Contreras


  reply	other threads:[~2011-05-03 17:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27  8:26 Felipe Contreras
2011-04-27  9:02 ` Jérémie Roquet
2011-04-27  9:11   ` Felipe Contreras
2011-04-27  9:51     ` Felipe Contreras
2011-04-27 15:06 ` Bart Schaefer
2011-04-28 20:19 ` Felipe Contreras
2011-04-29  3:31   ` Bart Schaefer
2011-05-02 18:11     ` Felipe Contreras
2011-05-03  1:42       ` Bart Schaefer
2011-05-03  8:05         ` Felipe Contreras
2011-05-03 14:39           ` Bart Schaefer
2011-05-03 15:04             ` Bart Schaefer
2011-05-03 17:41               ` Felipe Contreras [this message]
2011-05-04  0:39                 ` Bart Schaefer
2011-05-05 14:39                   ` Felipe Contreras
2011-05-05 16:24                     ` Bart Schaefer
2011-05-05 16:40                       ` Felipe Contreras
2011-05-05 19:38                         ` Bart Schaefer
2011-05-05 20:14                           ` Felipe Contreras
2011-05-05 21:12                             ` Nikolai Weibull
2011-05-03 17:36             ` Felipe Contreras
2011-05-04  0:56               ` Bart Schaefer
2011-05-05 14:48                 ` Felipe Contreras
2011-05-05 15:50                   ` Bart Schaefer
2011-05-05 15:55                     ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTim9YUZh8YMfvFxWqJnHHC6UtMaLag@mail.gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).