zsh-users
 help / color / mirror / code / Atom feed
* tab completion list does not complete dot files
@ 2007-06-01  5:54 t takahashi
  2007-06-01  9:38 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: t takahashi @ 2007-06-01  5:54 UTC (permalink / raw)
  To: zsh-users

i am not a subscriber, and hope this is ok to ask here.  seems to be.

please copy me on any replies.

when i use tab completion on a directory with dot files, the dot files
are ignored in the completion list.  "/tmp/\t" will not list
/tmp/.foo.

in the man pages i have not found a way to make zsh list the dot files
in the completion list when i press tab.  (my preferred behavior for *
expansion in both shells, otoh, is to *not* expand dots.  i have
solved that one already.)

possible?

thanks.

-- 
Webmaster: do you believe that people will (a) switch browsers to view
your "best viewed with" page or (b) go to your competitor?


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

* Re: tab completion list does not complete dot files
  2007-06-01  5:54 tab completion list does not complete dot files t takahashi
@ 2007-06-01  9:38 ` Peter Stephenson
  2007-06-02 22:43   ` t takahashi
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 2007-06-01  9:38 UTC (permalink / raw)
  To: zsh-users, t takahashi

"t takahashi" wrote:
> when i use tab completion on a directory with dot files, the dot files
> are ignored in the completion list.  "/tmp/\t" will not list
> /tmp/.foo.
> 
> in the man pages i have not found a way to make zsh list the dot files
> in the completion list when i press tab.

I assume you are using the "new" completion system (it's not so new now).

You can make the *entire* completion system do this by putting
the following code in your initialisation file after you run "compinit":

_comp_options+=(globdots)

If your version of the shell is before 4.2, you might need to expand that:

_comp_options=($_comp_options globdots)

This will make the completion system complete files beginning with dot
in every single place it possibly could.  I don't think there's an easy
way of restricting the effect.  However, as you wanted, it won't affect
the use of globbing ("*" etc.) on the command line.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview


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

* Re: tab completion list does not complete dot files
  2007-06-01  9:38 ` Peter Stephenson
@ 2007-06-02 22:43   ` t takahashi
  2007-06-03 13:54     ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: t takahashi @ 2007-06-02 22:43 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-users

as before, please copy me.

On 6/1/07, Peter Stephenson <pws@csr.com> wrote:
> You can make the *entire* completion system do this by putting

entire?  is that important?

> the following code in your initialisation file after you run "compinit":
> 
> _comp_options+=(globdots)

i had no idea what you were talking about, because compinit said command not found, but eventually tried this:

                autoload -U compinit
                compinit
                _comp_options+=(globdots)

now it doesn't complete symlinks even when the symlinks are partly typed.  what i want is all files to be completed except . .., without affecting glob expansion.

fwiw, i use zsh mainly because bash has interrupt behavior that doesn't work the way i expect, and it's too much effort to try to figure out if bash can be fixed.  i *always* script to the intersection of the two shells and, for now, use bash for most scripts.  zsh users do seem to be friendly, which i like.  i will give up on this if it requires more typing (rsi).

thanks very much for your reply.

-- 
Webmaster: do you believe that people will (a) switch browsers to view your "best viewed with" page or (b) go to your competitor?


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

* Re: tab completion list does not complete dot files
  2007-06-02 22:43   ` t takahashi
@ 2007-06-03 13:54     ` Peter Stephenson
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2007-06-03 13:54 UTC (permalink / raw)
  To: t takahashi, zsh-users

"t takahashi" wrote:
> > You can make the *entire* completion system do this by putting
> 
> entire?  is that important?

There's a lot of it.

> > the following code in your initialisation file after you run "compinit":
> > 
> > _comp_options+=(globdots)
> 
> i had no idea what you were talking about, because compinit said command not 
> found

So you weren't at that point using the new completion system.  That's
why I asked.

> now it doesn't complete symlinks even when the symlinks are partly
> typed.

Not only should it complete symbolic links, I can't offhand think of a
way to get it *not* to.  Does this apply to all symbolic links, or only
symbolic links that don't point at an existing file, or only symbolic
links that begin with a dot, or something else?

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


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

end of thread, other threads:[~2007-06-03 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-01  5:54 tab completion list does not complete dot files t takahashi
2007-06-01  9:38 ` Peter Stephenson
2007-06-02 22:43   ` t takahashi
2007-06-03 13:54     ` 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).