zsh-users
 help / color / mirror / code / Atom feed
From: Miek Gieben <miek@miek.nl>
To: zsh-users@zsh.org
Subject: Re: default to file completion
Date: Sun, 25 Dec 2011 11:32:09 +0100	[thread overview]
Message-ID: <20111225103209.GA15989@miek.nl> (raw)
In-Reply-To: <111223124522.ZM17185@torch.brasslantern.com>

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

[ Quoting <schaefer@brasslantern.com> at 12:45 on Dec 23 in "Re: default to file ..." ]
> Although it's not documented in the man pages, this can also be done by
> redefining the function _first (which by default is a no-op).  Hence:
> 
>     _first() {
>       if [[ CURRENT -gt 1 && "${words[1]}" = ./* ]];
>       then
>         _compskip=all
>         _files
>       fi
>     }
> 
> There's a much more complicated example as a large comment in the _first
> function that is supplied with the shell.

Thanks! Very helpful.

 grtz,

-- 
    Miek

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2011-12-25 10:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-18 10:11 Miek Gieben
2011-12-18 13:57 ` Mikael Magnusson
2011-12-18 15:20   ` Miek Gieben
2011-12-22 23:01   ` Miek Gieben
2011-12-22 23:42     ` '$1' indexing Ray Andrews
2011-12-23  0:11       ` Bart Schaefer
2011-12-23  2:08         ` Ray Andrews
2011-12-23 20:56           ` Bart Schaefer
2011-12-23 20:45     ` default to file completion Bart Schaefer
2011-12-25 10:32       ` Miek Gieben [this message]
2011-12-20 19:38 ` gi1242+zsh

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=20111225103209.GA15989@miek.nl \
    --to=miek@miek.nl \
    --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).