From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id faa98c65 for ; Fri, 13 Dec 2019 21:10:59 +0000 (UTC) Received: (qmail 19563 invoked by alias); 13 Dec 2019 21:10:53 -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: List-Unsubscribe: X-Seq: 24527 Received: (qmail 20013 invoked by uid 1010); 13 Dec 2019 21:10:53 -0000 X-Qmail-Scanner-Diagnostics: from mta01.eastlink.ca by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25656. spamassassin: 3.4.2. Clear:RC:0(24.224.136.30):SA:0(-2.6/5.0):. Processed in 1.698507 secs); 13 Dec 2019 21:10:53 -0000 X-Envelope-From: rayandrews@eastlink.ca X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.eastlink.ca designates 24.224.136.30 as permitted sender) X-Authority-Analysis: v=2.3 cv=ebZDgIMH c=1 sm=1 tr=0 a=zv49KfEsxEDzuN5AGO7r0Q==:117 a=zv49KfEsxEDzuN5AGO7r0Q==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=aortuH05rPyaURi-aUkA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudelledgudegiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucfkphepvdegrddvtdejrdeltddrudelgeenucfrrghrrghmpehinhgvthepvdegrddvtdejrdeltddrudelgedphhgvlhhopegludelvddrudeikedrtddrfegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghenucevlhhushhtvghrufhiiigvpedt X-Vade-Score: 0 X-Vade-State: 0 X-EL-IP-NOAUTH: 24.207.90.194 Subject: Re: completion of filenames To: zsh-users@zsh.org References: <1575995450.4447.3.camel@samsung.com> <1576254243.5214.21.camel@samsung.com> From: Ray Andrews Message-id: Date: Fri, 13 Dec 2019 13:10:15 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 8bit Content-language: en-US On 2019-12-13 11:46 a.m., Bart Schaefer wrote: It's more than my tiny brain can really understand Bart, however: > You've got one more issue, I think, based on your subsequent question: > >> Where is 'expand-or-complete' defined? > You shouldn't be using both expand-or-complete and the _expand > completer. I was under the impression that the TAB key called expand-or-complete and that this somehow tweaked itself via the 'zstyle .....' lines. > If you invoke expand-or-complete, it's going to try to do > expansion on the word and if that succeeds it will never proceed into > attempting completion. To use _expand, you should be re-binding the > TAB key: > > bindkey "^I" complete-word > > Usually compinit will take care of this for you, but only if the > zstyle definitions appear in your .zshrc (et al) BEFORE you invoke > compinit. This is in the doc: > > To initialize the system, the function compinit should be in a direc- > tory mentioned in the fpath parameter ... If completion styles (see > below) are set up to perform expansion as well as completion by > default, and the TAB key is bound to expand-or-complete, compinit will > rebind it to complete-word; this is necessary to use the correct form > of expansion. > > Does any of this help with your situation? All possible combinations of the above have not yet been tested, however as I have it now:     zstyle ':completion:*' completer _files _expand _complete #('_files' first as you suggest).      autoload -U compinit && compinit -d $ZSHBOOT/zcompdump This had been *above* the 'styles', moving it below the 'styles' as you indicate seems to have worked :-) What is puzzling is that your previous help with my 'styles' was effective even though 'autoload ...'  was above it.     # This is the default for TAB:     #bindkey  '^I' expand-or-complete     #bindkey '^I' complete word             #(tried but didn't work *apart* from the above and seems not needed anyway so TAB is default. So, pending further advice or tinkerings, It is exactly as I want: empty or partial command line is first completed with local files. I guess this is a cultural issue -- if one is accustomed to the normal function then you wouldn't want it any other way and this could be a last remaining vestige of my DOS-think, but I can't imagine completion working on anything other than files myself, seeing commands pop up really bothers me. Thanks again Bart.