* Weird tab complete problem with long directory names with a dash and unicode characters @ 2016-12-31 20:44 ` Mikael Magnusson 2017-01-01 3:47 ` Daniel Shahaf 2017-01-03 12:57 ` Peter Stephenson 0 siblings, 2 replies; 6+ messages in thread From: Mikael Magnusson @ 2016-12-31 20:44 UTC (permalink / raw) To: zsh workers If you do mkdir -p るるるるるるるるるるるるるるるるるるるるるるるるる-/foo and then attempt to complete foo from the current location, it doesn't work with compinit loaded. If you take off one of the るs it's fine, if you take out the - it's fine (though the position of the - doesn't seem to matter), if you use a million "a"s instead it's fine, the る isn't super special though, it's also broken with a bunch of け or any other combination I tried (I originally found it because of a real directory name). My guess is this is somehow related to the - / Dash stuff Peter did recently, but reverting them randomly also didn't seem to have much effect. I'm also puzzled as to why the length of the string matters and why 26? -- Mikael Magnusson ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Weird tab complete problem with long directory names with a dash and unicode characters 2016-12-31 20:44 ` Weird tab complete problem with long directory names with a dash and unicode characters Mikael Magnusson @ 2017-01-01 3:47 ` Daniel Shahaf 2017-01-02 21:52 ` Bart Schaefer 2017-01-03 12:57 ` Peter Stephenson 1 sibling, 1 reply; 6+ messages in thread From: Daniel Shahaf @ 2017-01-01 3:47 UTC (permalink / raw) To: Mikael Magnusson; +Cc: zsh workers Mikael Magnusson wrote on Sat, Dec 31, 2016 at 21:44:28 +0100: > mkdir -p るるるるるるるるるるるるるるるるるるるるるるるるる-/foo > and then attempt to complete foo from the current location, it doesn't > work with compinit loaded. If you take off one of the るs it's fine, if > you take out the - it's fine (though the position of the - doesn't > seem to matter), if you use a million "a"s instead it's fine, the る > isn't super special though, it's also broken with a bunch of け or any > other combination I tried (I originally found it because of a real > directory name). My guess is this is somehow related to the - / Dash > stuff Peter did recently, but reverting them randomly also didn't seem > to have much effect. I'm also puzzled as to why the length of the > string matters and why 26? Bisected this down to these three: * commit c2b6bd51f98a5871acd9fcbeddad67216a07907c | Author: Peter Stephenson <pws@zsh.org> | Date: Tue Jan 19 17:38:59 2016 +0000 | | 37693: turn Dash into '-' in glob qualifiers | * commit ad16356e1923ec1b4daf97b27b10a835cfe73ba7 | Author: Peter Stephenson <pws@zsh.org> | Date: Tue Jan 19 17:24:12 2016 +0000 | | 37689: ! and ^ need to be tokenised in character sets | * commit 8eb9070d6785f423dd9bdbbb0513aa47c8a08d62 Author: Peter Stephenson <pws@zsh.org> Date: Tue Jan 19 09:55:46 2016 +0000 37678: Now possible to quote "-" in pattern range c2b6bd51 gives the same symptoms as in HEAD. The two commits before that give "compaudit:151: unknown file attribute: -". The parent of 8eb9070d completes '.../foo' correctly. These revisions are new in 5.3. Cheers, Daniel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Weird tab complete problem with long directory names with a dash and unicode characters 2017-01-01 3:47 ` Daniel Shahaf @ 2017-01-02 21:52 ` Bart Schaefer 2017-01-03 2:57 ` Daniel Shahaf 0 siblings, 1 reply; 6+ messages in thread From: Bart Schaefer @ 2017-01-02 21:52 UTC (permalink / raw) To: zsh workers On Jan 1, 3:47am, Daniel Shahaf wrote: } } c2b6bd51 gives the same symptoms as in HEAD. The two commits before } that give "compaudit:151: unknown file attribute: -". You should try "compinit -u" to get past this and see if the completion itself still works. It seems unlikely that c2b6bd51 broke this because there are no glob qualifiers anywhere in the failing completion. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Weird tab complete problem with long directory names with a dash and unicode characters 2017-01-02 21:52 ` Bart Schaefer @ 2017-01-03 2:57 ` Daniel Shahaf 0 siblings, 0 replies; 6+ messages in thread From: Daniel Shahaf @ 2017-01-03 2:57 UTC (permalink / raw) To: zsh workers Bart Schaefer wrote on Mon, Jan 02, 2017 at 13:52:06 -0800: > On Jan 1, 3:47am, Daniel Shahaf wrote: > } > } c2b6bd51 gives the same symptoms as in HEAD. The two commits before > } that give "compaudit:151: unknown file attribute: -". > > You should try "compinit -u" to get past this and see if the completion > itself still works. It seems unlikely that c2b6bd51 broke this because > there are no glob qualifiers anywhere in the failing completion. That narrows it down further: ad16356e1923ec1b4daf97b27b10a835cfe73ba7 is the first bad commit commit ad16356e1923ec1b4daf97b27b10a835cfe73ba7 Author: Peter Stephenson <pws@zsh.org> Date: Tue Jan 19 17:24:12 2016 +0000 37689: ! and ^ need to be tokenised in character sets ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Weird tab complete problem with long directory names with a dash and unicode characters 2016-12-31 20:44 ` Weird tab complete problem with long directory names with a dash and unicode characters Mikael Magnusson 2017-01-01 3:47 ` Daniel Shahaf @ 2017-01-03 12:57 ` Peter Stephenson 2017-01-03 14:36 ` Peter Stephenson 1 sibling, 1 reply; 6+ messages in thread From: Peter Stephenson @ 2017-01-03 12:57 UTC (permalink / raw) To: zsh workers On Sat, 31 Dec 2016 21:44:28 +0100 Mikael Magnusson <mikachu@gmail.com> wrote: > If you do > mkdir -p るるるるるるるるるるるるるるるるるるるるるるるるる-/foo > and then attempt to complete foo from the current location, it doesn't > work with compinit loaded. Got somewhere with this: adding a bogus assignment of tmp1 back to itself inside _path_files (first of the two lines below), I get +_path_files:467> tmp1=( 'xるるるるるるるるるるるるる-/*' ) +_path_files:468> tmp1=( ) The string in the first line seems to be correct, unless I'm not seeing / copying everything that's there. The next line is an expansion using $~tmp1 that should just glob. So it's going wrong there --- command line tests seem to confirm this. pws ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Weird tab complete problem with long directory names with a dash and unicode characters 2017-01-03 12:57 ` Peter Stephenson @ 2017-01-03 14:36 ` Peter Stephenson 0 siblings, 0 replies; 6+ messages in thread From: Peter Stephenson @ 2017-01-03 14:36 UTC (permalink / raw) To: zsh workers On Tue, 3 Jan 2017 12:57:06 +0000 Peter Stephenson <p.stephenson@samsung.com> wrote: > The next line is an expansion using $~tmp1 that should just glob. So > it's going wrong there --- command line tests seem to confirm this. Oh, it's that hack for pure strings in a pattern with Meta characters again (hi from Cambridge). So it depends on metafication and memory management and in the affected cases it was only ever working by luck. Time we got just rid of it completely (bye). pws diff --git a/Src/pattern.c b/Src/pattern.c index 1f2e94b..928790f 100644 --- a/Src/pattern.c +++ b/Src/pattern.c @@ -668,15 +668,9 @@ patcompile(char *exp, int inflags, char **endexp) if (imeta(*mtest)) nmeta++; if (nmeta) { - char *oldpatout = patout; - ptrdiff_t pd; patadd(NULL, 0, nmeta, 0); - /* - * Yuk. - */ p = (Patprog)patout; - pd = patout - oldpatout; - opnd += pd; + opnd = dupstring_wlen(opnd, oplen); dst = patout + startoff; } ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-03 14:36 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20161231222027epcas2p263aba2ec0dd2552aabf50ad6148334be@epcas2p2.samsung.com> 2016-12-31 20:44 ` Weird tab complete problem with long directory names with a dash and unicode characters Mikael Magnusson 2017-01-01 3:47 ` Daniel Shahaf 2017-01-02 21:52 ` Bart Schaefer 2017-01-03 2:57 ` Daniel Shahaf 2017-01-03 12:57 ` Peter Stephenson 2017-01-03 14:36 ` Peter Stephenson
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).