From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18470 invoked by alias); 27 May 2015 12:06:06 -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: 20227 Received: (qmail 25340 invoked from network); 27 May 2015 12:06:04 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f4-f79c56d0000012ee-3c-5565b0ceed51 Date: Wed, 27 May 2015 12:55:49 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: change behaviour of command line completion Message-id: <20150527125549.4961ffde@pwslap01u.europe.root.pri> In-reply-to: References: Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsVy+t/xK7rnNqSGGhw9a26x4+RKRgdGj1UH PzAFMEZx2aSk5mSWpRbp2yVwZfR++cBesEKo4vGSDywNjJf4uhg5OSQETCS6jt9kg7DFJC7c Ww9kc3EICSxllFhzeRErSEJIYBqTxM97shCJbYwS347NBqri4GARUJW48y4YpIZNwFBi6qbZ jCC2iICoxPIVm9lBbGEBC4mPu46BLeAVsJc4/3URM4jNKRAs0XzsGjPE/ACJCQ1nwXr5BfQl rv79xARxkL3EzCtnGCF6BSV+TL7HAmIzC2hJbN7WxAphy0tsXvMWao66xI27u9knMArNQtIy C0nLLCQtCxiZVzGKppYmFxQnpeca6hUn5haX5qXrJefnbmKEhOyXHYyLj1kdYhTgYFTi4T0g nRoqxJpYVlyZe4hRgoNZSYT32nSgEG9KYmVValF+fFFpTmrxIUZpDhYlcd65u96HCAmkJ5ak ZqemFqQWwWSZODilGhg732+LtLzSf29PdW/t5WV+X7queSjbZqqGyF8y2ZbObrN6QbBTm5D+ Xb65RrLvXex97+zlWN4eV/7TMsYvkH2dXOlt5ZJvEYyrmRzftky8NCly96ufyZ+lrGzUnted tMwV4QvQ6Wq7mPU4SJnr4MJD/FqeJwPctURKr5mvmOoveeUNz5NjhUosxRmJhlrMRcWJAHEp zx1VAgAA On Wed, 27 May 2015 13:36:56 +0200 ruud grosmann wrote: > In the old situation, when I was in a directory with only one file, > 'example.txt' and I typed 'ls x', no completion followed. Because > no files start with an 'x'. > But now, zsh happily changes the x to 'example.txt', because the x is > in 'example.txt'. I rather don't want this behaviour, but I cannot > find in the documentation of the options anything that describes this. I'm assuming ohmyzsh uses the new completion system... I have no idea about ohmyzsh so I'm referring to the underlying shell to look for what might be causing it. This could be various things... 1. Approximate completion. In other words, it's correcting what you type and then trying to complete that. So it thinks you "mistyped" by omitting the "e" from "example.txt". Do zstyle -L | grep -w completer and look for something like: zstyle ':completion:*' completer _oldlist _expand _user_expand _complete _ignored _approximate (This is mine, not ohmyzsh.) If you see that "_approximate" (or also "_correct") you want to remove those. Using exactly the same line with that word or those words removed will do the trick (the output in that form gives you a valid command line you can put in .zshrc). In this case, for example: zstyle ':completion:*' completer _oldlist _expand _user_expand _complete _ignored 2. Matcher control. This allows you to update the rules that compare what's on the command line with the trial matches. This is probably less likely, but it's certainly possible to set the sehll up like this. Do zstyle -L | grep matcher-list and look for something like: zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[[:punct:]]=* r:|=*' As matcher control is complicated, the simplest thing to do is remove arguments from the end and enter the corresponding line until the problem goes away. Put very briefly, things like 'r:|=*' and 'l:|=*' are what might be causing the problem as they're allowing the completion system to add anything at one end or other of the string. Obviously, adding things at the end isn't usually a problem so I'd worry more about things looking like 'l:|=*'. Hope that's enough to track it down. pws