From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7982 invoked by alias); 25 Dec 2011 10:32:27 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16668 Received: (qmail 23758 invoked from network); 25 Dec 2011 10:32:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at atoom.net does not designate permitted sender hosts) Date: Sun, 25 Dec 2011 11:32:09 +0100 From: Miek Gieben To: zsh-users@zsh.org Subject: Re: default to file completion Message-ID: <20111225103209.GA15989@miek.nl> Mail-Followup-To: zsh-users@zsh.org References: <20111218101116.GA4446@miek.nl> <20111222230108.GA32237@miek.nl> <111223124522.ZM17185@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline In-Reply-To: <111223124522.ZM17185@torch.brasslantern.com> User-Agent: Vim/Mutt/Linux X-Home: http://www.miek.nl --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [ Quoting 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: >=20 > _first() { > if [[ CURRENT -gt 1 && "${words[1]}" =3D ./* ]]; > then > _compskip=3Dall > _files > fi > } >=20 > 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, --=20 Miek --ZPt4rx8FFjLCG7dd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk72+6kACgkQJYuFzziA0PYjggCdH/X7UrOgupW8ObBbtB0KYByN q5AAniJ9Yzh6KrVr0VFJfFiWeZv13y2B =YNZE -----END PGP SIGNATURE----- --ZPt4rx8FFjLCG7dd--