From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#19911: 24.4; shell-mode command completion - smarter handling of backup files Date: Fri, 20 Feb 2015 13:43:11 +0200 Message-ID: <83bnkolsfk.fsf@gnu.org> References: <7E039918541B4C4183BFDB8F015C743032DD9159@WCL-EXCH02.wcl.local> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1424432610 30360 80.91.229.3 (20 Feb 2015 11:43:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Feb 2015 11:43:30 +0000 (UTC) Cc: 19911@debbugs.gnu.org To: Ed Avis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 20 12:43:18 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YOlzK-0002HJ-C6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Feb 2015 12:43:18 +0100 Original-Received: from localhost ([::1]:59976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOlzE-000833-7o for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Feb 2015 06:43:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOlz8-00081p-9s for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2015 06:43:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOlz4-0003a2-TY for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2015 06:43:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOlz4-0003Zt-R2 for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2015 06:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YOlz4-0006LZ-Gt for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2015 06:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Feb 2015 11:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19911 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19911-submit@debbugs.gnu.org id=B19911.142443257924388 (code B ref 19911); Fri, 20 Feb 2015 11:43:02 +0000 Original-Received: (at 19911) by debbugs.gnu.org; 20 Feb 2015 11:42:59 +0000 Original-Received: from localhost ([127.0.0.1]:49197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOlz1-0006LH-Et for submit@debbugs.gnu.org; Fri, 20 Feb 2015 06:42:59 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:46921) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOlyy-0006L8-FQ for 19911@debbugs.gnu.org; Fri, 20 Feb 2015 06:42:57 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NK200900IZBAR00@a-mtaout21.012.net.il> for 19911@debbugs.gnu.org; Fri, 20 Feb 2015 13:42:55 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NK2009BTJ7IAY00@a-mtaout21.012.net.il>; Fri, 20 Feb 2015 13:42:55 +0200 (IST) In-reply-to: <7E039918541B4C4183BFDB8F015C743032DD9159@WCL-EXCH02.wcl.local> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99642 Archived-At: > From: Ed Avis > Date: Fri, 20 Feb 2015 11:35:21 +0000 > > Create a file 'script' and make it executable. Edit it in emacs > so that a backup file 'script~' is also created (and Emacs makes > the backup file executable too). > > Now m-x shell and type > > ls script TAB TAB > > The first TAB appears not to do anything, but the second TAB inserts a > space as a unique completion. This is because tab-completion for > filenames gives lower importance to backup files ending ~, so that they > won't by themselves cause a completions buffer to pop up. That is a > useful enhancement to the usability of tab-completion. > > However, the same useful behaviour isn't applied for command completion, > in other words the first word of the shell command typed. Enter > > ./script TAB TAB > > and you get a 'Complete, but not unique' message and on the second TAB > a completions buffer showing script and script~. > > It would be more useful to treat the backup file consistently with what > happens for ordinary filename completion, so that the first TAB would > appear to do nothing, while the second TAB inserts a space. Does customizing shell-completion-fignore to include "~" do what you want?