zsh-users
 help / color / mirror / code / Atom feed
From: Scott Frazer <frazer.scott@gmail.com>
To: zsh-users@zsh.org
Subject: Re: Dynamic named directories and completion
Date: Mon, 26 Feb 2018 09:31:31 -0500	[thread overview]
Message-ID: <p715k4$52o$1@blaine.gmane.org> (raw)
In-Reply-To: <20180224201237.5e1ee8b2@ntlworld.com>

On 2/24/18 3:12 PM, Peter Stephenson wrote:
> On Sat, 24 Feb 2018 20:49:14 +0100
> Mikael Magnusson <mikachu@gmail.com> wrote:
>> I have some patches I was working on related to this, but I assume
>> there was still some problem, or I would have committed them...
>> There's two patches in this thread,
>> http://www.zsh.org/mla/workers/2015/msg01439.html and then I think I
>> never sent the third one,
> 
> This is all quite complicated so I can well believe it's useful; I don't
> think it fixes the behaviour I was seeing (but I may be getting
> confused).
> 
> On the same theme, I think the following is useful for those of us
> using the _expand completer, which may well have nothing whatsoever to
> do with the original problem.
> 
> pws
> 
> diff --git a/Completion/Base/Completer/_expand b/Completion/Base/Completer/_expand
> index a6e30e8..ee3681b 100644
> --- a/Completion/Base/Completer/_expand
> +++ b/Completion/Base/Completer/_expand
> @@ -43,7 +43,8 @@ zstyle -s ":completion:${curcontext}:" accept-exact tmp ||
>   
>   if [[ "$tmp" != (yes|true|on|1) ]]; then
>     { [[ "$word" = \~(|[-+]) ||
> -       ( "$word" = \~[-+][1-9]## && $word[3,-1] -le $#dirstack ) ]] && return 1 }
> +	   ( "$word" = \~[-+][1-9]## && $word[3,-1] -le $#dirstack ) ||
> +     $word = \~\[*\]/* ]] && return 1 }
>     { [[ ( "$word" = \~* && ${#userdirs[(I)${word[2,-1]}*]}+${#nameddirs[(I)${word[2,-1]}*]} -gt 1 ) ||
>          ( "$word" = *\$[a-zA-Z0-9_]## &&
>            ${#parameters[(I)${word##*\$}*]} -ne 1 ) ]] && continue=1 }
> 

Just this patch does not fix the completion issue (I even upgraded to 5.4.2
just to be sure).  Since M-x complete-word does work, I may try looking at
expand-or-complete to see if I can figure out what is happening.  I'm no
zsh expert though, so I will likely need help not breaking something else.


  reply	other threads:[~2018-02-26 14:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 22:54 Scott Frazer
2018-02-23  0:29 ` [RFC PATCH] _path_files: teach zsh_directory_name Takeshi Banse
2018-02-23  1:19   ` _path_files: fix copy paste error Takeshi Banse
2018-02-23  1:30   ` _path_files: fix copy paste error (2/2) Takeshi Banse
2018-02-23  8:01 ` Dynamic named directories and completion Vincent Bernat
2018-02-23 14:41   ` Scott Frazer
2018-02-23 15:02     ` Takeshi Banse
2018-02-23 14:42   ` Scott Frazer
2018-02-24 19:34     ` Peter Stephenson
2018-02-24 19:49       ` Mikael Magnusson
2018-02-24 20:12         ` Peter Stephenson
2018-02-26 14:31           ` Scott Frazer [this message]
2018-02-26 13:53       ` Scott Frazer
2018-02-26 14:47         ` Peter Stephenson
2018-02-26 16:44           ` Scott Frazer
2018-02-26 20:08             ` Peter Stephenson
2018-02-26 21:22               ` Peter Stephenson
2018-02-26 17:49           ` Mikael Magnusson
2018-02-26 17:55             ` Peter Stephenson

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='p715k4$52o$1@blaine.gmane.org' \
    --to=frazer.scott@gmail.com \
    --cc=zsh-users@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).