zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: globcomplete desctroys file completion
Date: Wed, 25 Feb 2009 20:12:36 -0800	[thread overview]
Message-ID: <090225201236.ZM22079@torch.brasslantern.com> (raw)
In-Reply-To: <090225173059.ZM21819@torch.brasslantern.com>

On Feb 25,  5:30pm, Bart Schaefer wrote:
}
} Take a look at this:
} 
} schaefer<506> print T*/t*/t<TAB>
} schaefer<506> print Tmp/texlive/texmf-local/
} Completing default
} texlive/      texlive/      texlive/      texlive2008/
} texlive/      texlive/      texlive2008/  texlive2008/
} texlive/      texlive/      texlive2008/  texlive2008/
} texlive/      texlive/      texlive2008/  texlive2008/
} 
} (menu-select highlight is on the first "texlive/").  If I left-arrow

(That should have said "right-arrow")

} through the menu, I get e.g.
} 
} schaefer<506> print Tmp/texlive/texmf-config/
} 
} schaefer<506> print Tmp/texlive/texmf-var/
} 
} schaefer<506> print Tmp/texlive2008/texmf-dist/
} 
} This leads me to believe that really the second -s should have been
} a -S (a suffix, not a hidden suffix) and the first -s in tmp4 was in
} fact correct.

No, that's not right either.  At this point the following is the only
thing I've tried that gets me the same behavior (including proper cursor
placement) both with and without globcomplete set.  This bothers me,
because I don't understand why globcomplete sends us through this branch
of the code in the first place.  I mean, I follow the conditional logic
in _path_files that gets it here, but I don't know why the conditionals
are written the way they are.

--- ../current/Completion/Unix/Type/_path_files	2009-02-25 17:03:56.000000000 -0800
+++ Completion/Unix/Type/_path_files	2009-02-25 20:03:30.000000000 -0800
@@ -670,9 +670,9 @@
 	         "$pfxsfx[@]" $Mopts )
 	  if [[ -z "$listsfx" ]]; then
             for i in "$tmp1[@]"; do
-	      tmpdisp=("${i%%/*}")
+	      tmpdisp=("$i")
 	      _list_files tmpdisp "$prepath$realpath$testpath"
-	      compadd "$tmp4[@]" -s "/${i#*/}${Uopt:+$ISUFFIX}" $listopts - "$tmpdisp"
+	      compadd "$tmp4[@]" -s "${Uopt:+$ISUFFIX}" $listopts - "$tmpdisp"
 	    done
           else
             [[ -n "$compstate[pattern_match]" ]] && SUFFIX="${SUFFIX:s./.*/}*"


  reply	other threads:[~2009-02-26  4:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-21 14:18 Jörg Sommer
2009-02-21 19:16 ` Bart Schaefer
2009-02-22  0:57   ` Bart Schaefer
2009-02-25 20:39     ` Peter Stephenson
2009-02-25 20:48       ` Peter Stephenson
2009-02-26  0:24         ` Jörg Sommer
2009-02-26  1:30         ` Bart Schaefer
2009-02-26  4:12           ` Bart Schaefer [this message]
2009-02-26 10:49             ` Peter Stephenson
2009-02-22 20:36   ` Jörg Sommer
2009-02-23  2:25     ` Bart Schaefer

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=090225201236.ZM22079@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /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).