zsh-users
 help / color / mirror / code / Atom feed
* completion of path with double slashes
@ 2022-01-26  9:02 Pier Paolo Grassi
  2022-01-26  9:48 ` Andreas Kusalananda Kähäri
  0 siblings, 1 reply; 3+ messages in thread
From: Pier Paolo Grassi @ 2022-01-26  9:02 UTC (permalink / raw)
  To: Zsh-Users List

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

Hello, I noticed that having a double slash in a path that I then try to
complete, ie:

/home/paul//ab<TAB>

requires a significant more amount of time to execute than the same path
without double slashes.
I tried this with zsh -f, and it does not reproduce.
Is there a setting that comes to mind that can be responsible for this?
thanks

Pier Paolo Grassi

[-- Attachment #2: Type: text/html, Size: 665 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: completion of path with double slashes
  2022-01-26  9:02 completion of path with double slashes Pier Paolo Grassi
@ 2022-01-26  9:48 ` Andreas Kusalananda Kähäri
  2022-01-26 11:27   ` Pier Paolo Grassi
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Kusalananda Kähäri @ 2022-01-26  9:48 UTC (permalink / raw)
  To: Pier Paolo Grassi; +Cc: Zsh-Users List

On Wed, Jan 26, 2022 at 10:02:37AM +0100, Pier Paolo Grassi wrote:
> Hello, I noticed that having a double slash in a path that I then try to
> complete, ie:
> 
> /home/paul//ab<TAB>
> 
> requires a significant more amount of time to execute than the same path
> without double slashes.
> I tried this with zsh -f, and it does not reproduce.
> Is there a setting that comes to mind that can be responsible for this?
> thanks
> 
> Pier Paolo Grassi

If you use compinit in your .zshrc, then // in a path will be treated as
/*/ when doing filename completion.

Look for "squeeze-slashes" in the zshcompsys(1) manual.

	squeeze-slashes
               If set to `true', sequences of slashes in filename paths
               (for example in `foo//bar') will be treated as a single
               slash.  This is the usual behaviour of UNIX paths.
               However, by default the file completion function behaves
               as if there were a `*' between the slashes.

-- 
Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden

.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: completion of path with double slashes
  2022-01-26  9:48 ` Andreas Kusalananda Kähäri
@ 2022-01-26 11:27   ` Pier Paolo Grassi
  0 siblings, 0 replies; 3+ messages in thread
From: Pier Paolo Grassi @ 2022-01-26 11:27 UTC (permalink / raw)
  To: Pier Paolo Grassi, Zsh-Users List

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

Great, thanks!

Il giorno mer 26 gen 2022 alle 10:48 Andreas Kusalananda Kähäri <
andreas.kahari@abc.se> ha scritto:

> On Wed, Jan 26, 2022 at 10:02:37AM +0100, Pier Paolo Grassi wrote:
> > Hello, I noticed that having a double slash in a path that I then try to
> > complete, ie:
> >
> > /home/paul//ab<TAB>
> >
> > requires a significant more amount of time to execute than the same path
> > without double slashes.
> > I tried this with zsh -f, and it does not reproduce.
> > Is there a setting that comes to mind that can be responsible for this?
> > thanks
> >
> > Pier Paolo Grassi
>
> If you use compinit in your .zshrc, then // in a path will be treated as
> /*/ when doing filename completion.
>
> Look for "squeeze-slashes" in the zshcompsys(1) manual.
>
>         squeeze-slashes
>                If set to `true', sequences of slashes in filename paths
>                (for example in `foo//bar') will be treated as a single
>                slash.  This is the usual behaviour of UNIX paths.
>                However, by default the file completion function behaves
>                as if there were a `*' between the slashes.
>
> --
> Andreas (Kusalananda) Kähäri
> SciLifeLab, NBIS, ICM
> Uppsala University, Sweden
>
> .
>
-- 
Pier Paolo Grassi

[-- Attachment #2: Type: text/html, Size: 1821 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-26 11:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-26  9:02 completion of path with double slashes Pier Paolo Grassi
2022-01-26  9:48 ` Andreas Kusalananda Kähäri
2022-01-26 11:27   ` Pier Paolo Grassi

Code repositories for project(s) associated with this 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).