From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5394 invoked by alias); 20 Dec 2011 19:55: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: 16656 Received: (qmail 29570 invoked from network); 20 Dec 2011 19:55:16 -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=-3.3 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.2 Received-SPF: neutral (ns1.primenet.com.au: 128.2.11.61 is neither permitted nor denied by SPF record at _spf.google.com) Date: Tue, 20 Dec 2011 14:38:30 -0500 From: gi1242+zsh@gmail.com To: Zsh users Subject: Re: default to file completion Message-ID: <20111220193830.GA1192@andrew.cmu.edu> Mail-Followup-To: gi1242+zsh@gmail.com, Zsh users References: <20111218101116.GA4446@miek.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline In-Reply-To: <20111218101116.GA4446@miek.nl> User-Agent: Mutt/1.5.18 (2008-05-17) X-PMX-Version: 5.5.9.388399, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.3.18.170322 X-SMTP-Spam-Clean: 33% ( RDNS_SUSP_FORGED_FROM 3.5, FORGED_FROM_GMAIL 0.1, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, NO_REAL_NAME 0, RDNS_BROADBAND 0, RDNS_GENERIC_POOLED 0, RDNS_POOLED 0, RDNS_SUSP 0, RDNS_SUSP_GENERIC 0, RDNS_SUSP_SPECIFIC 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CD 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_MSGID 0, __LINES_OF_YELLING 0, __MIME_VERSION 0, __RDNS_BROADBAND_5 0, __RDNS_POOLED_11 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __USER_AGENT 0) X-SMTP-Spam-Score: 33% X-Scanned-By: MIMEDefang 2.60 on 128.2.11.61 --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 18, 2011 at 11:11:32AM +0100, Miek Gieben wrote: > I've tried searching a bit, but I can not seem to find this specific > problem. I've enablef completion in zsh and now I'm running a program > of my own making (hence unknown to zsh): 'scan' >=20 > If I use tab completion the following happens: >=20 > ./scan -zone >=20 > And nothing gets completed. How can I tell zsh to fallback to filename > completion at that point? Here's an alternative to a case by case disabling of zsh completion, or renaming commands. 1. To plain old fall back on filename completion: zstyle ':completion:*' completer _expand _complete _files \ _correct _approximate The important thing above is the "_files" entry. This means if expansion or completion fails, it will try filename completion. (If that fails too, it will try correction or approximation.) 2. Define a widgit that just completes files, and bind it to something (e.g. f, in the example below). zle -C complete-file menu-expand-or-complete _generic zstyle ':completion:complete-file:*' completer _files bindkey -M viins '^Xf' complete-file =20 (Change -M viins to -M emacs if you don't use VI keys) This allows you to complete files anywhere, on any command, at any time, by pressing f (i.e. Control X, followed by f). GI --=20 100 THINGS I'D DO IF I EVER BECAME AN EVIL OVERLORD 34. I will not turn into a snake. It never helps. --k1lZvvs/B4yU6o8G Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk7w5C4ACgkQ6plSLtsExHG82wCfai0076qrPeKoXQGlVCY7L1+I bhsAn1vDPB6Rr3tLbIy2ka4srhSukkY9 =Wmkj -----END PGP SIGNATURE----- --k1lZvvs/B4yU6o8G--