From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alex Branham Newsgroups: gmane.emacs.bugs Subject: bug#34330: 27.0.50; shell auto-complete cannot handle special characters Date: Thu, 15 Aug 2019 11:10:54 -0500 Message-ID: <87sgq2v27l.fsf@gmail.com> References: <87zhkav2e4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="262821"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 34330@debbugs.gnu.org To: Tadeus Prastowo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 15 18:12:35 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hyIMb-00168n-Uz for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Aug 2019 18:12:34 +0200 Original-Received: from localhost ([::1]:43858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyIMa-000092-Ln for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Aug 2019 12:12:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43969) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyIMA-0008So-QD for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 12:12:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hyIM6-00017d-Ly for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 12:12:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43521) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hyIM6-00017W-GM for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 12:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hyIM6-0002ST-Ap for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 12:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Aug 2019 16:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34330 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch confirmed Original-Received: via spool by 34330-submit@debbugs.gnu.org id=B34330.15658854679363 (code B ref 34330); Thu, 15 Aug 2019 16:12:02 +0000 Original-Received: (at 34330) by debbugs.gnu.org; 15 Aug 2019 16:11:07 +0000 Original-Received: from localhost ([127.0.0.1]:52338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyILD-0002Qx-7r for submit@debbugs.gnu.org; Thu, 15 Aug 2019 12:11:07 -0400 Original-Received: from mail-ot1-f46.google.com ([209.85.210.46]:36580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyIL8-0002Pz-TW for 34330@debbugs.gnu.org; Thu, 15 Aug 2019 12:11:03 -0400 Original-Received: by mail-ot1-f46.google.com with SMTP id k18so6982732otr.3 for <34330@debbugs.gnu.org>; Thu, 15 Aug 2019 09:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=3fkgMb1Pb1R/epUmbjcpQ1NZSzw7biv9+dcDnhEcA1Q=; b=gFieMx1U5xwYUp/BThqNrzGXSer51Px0l5znuCiAvIvdbOiEksVb0/cNe1ehkbmVdB E0YdF4+v2t77vrQKMTmY9KX13uvMwlFJyhNWSsUhEXYGTKky8c9fMfqeeSGuDPCPywKg c0JMb4DLt3uu1Dlgxxkv+FbnwWBgY0ffvBbTzOcAcfcAAPzsVWqVPSwze+8XLSi5fEvO lL3CshzYooGd/FZPbeNp1wuLQUn7qIA5wCx6P+6gG9YpK3NapxywvuLfEyI09OogH0L+ 3S05AlC/1ODnfqoYTMCgajZgI/028kq7Acu9FysGPGlf2KibWM9XPSdDwDbswcH2NnM2 XSDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=3fkgMb1Pb1R/epUmbjcpQ1NZSzw7biv9+dcDnhEcA1Q=; b=aArnNeRGrgC0XKpe6cZmCQlThKJeBwPzvwGFC8WpYl6xJJzFJEfvPfS9F0mUp6jeRG vmcc8CQOh89T0KfzsebJFNFhjASMwF6v+IDHXIz7y4uP8zc7kDYUDaAA50qcLnk0l9ig z5PsYxLNa0bL+5HnRhChaBclOv5yFLHfrsu8/qZ1U0308Tm/9X1ozSSGAG9eBr/YYz3C gz89zFJH733+QMRObTPBwwCOceItlBAhkA7ElI62lwW+ZZvMr+73/ho1Yr3D7RyljHjk 8xVg036UmeRL6zXeXLj/HsStsz4IW1WsqL57y7C2H8YkZX6g7owmg3Hn1o5VCdCw4Zxh lkYQ== X-Gm-Message-State: APjAAAWjWJ2H1ciG/+TsfLEUsvuWMkKRksxcD0CtWvyy25/eG9jcEIJC lHnfpaYQKudwCNrVQuVF7+pDmHez9SM= X-Google-Smtp-Source: APXvYqwNpkEXOAwF7vpmcsq20dunhwU/M8vFmwwXfj62rLhC2Xwy4rvxjaBxG9wypN0dK9TW0l0pVQ== X-Received: by 2002:a9d:d27:: with SMTP id 36mr4221677oti.327.1565885456910; Thu, 15 Aug 2019 09:10:56 -0700 (PDT) Original-Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id w5sm541657oic.36.2019.08.15.09.10.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2019 09:10:54 -0700 (PDT) In-Reply-To: <87zhkav2e4.fsf@gmail.com> (Alex Branham's message of "Thu, 15 Aug 2019 11:06:59 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:165122 Archived-At: --=-=-= Content-Type: text/plain On Thu 15 Aug 2019 at 11:06, Alex Branham wrote: > Patch attached. ... and here's the actual patch >From 1af4915f3dc774b4fb53e2b52b1318f4b52b7ba3 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Thu, 15 Aug 2019 11:02:38 -0500 Subject: [PATCH] Fix filename completion in shell mode buffers * lisp/shell.el (shell-dynamic-complete-functions): Move pcomplete-completions-at-point down the list so that filename completion has a chance to complete before pcompletion. Fixes bug#34330 --- lisp/shell.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/shell.el b/lisp/shell.el index 2914d1d2c8..889602d26e 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -184,14 +184,15 @@ shell buffer. The value may depend on the operating system or shell." shell-environment-variable-completion shell-command-completion shell-c-a-p-replace-by-expanded-directory - pcomplete-completions-at-point shell-filename-completion - comint-filename-completion) + comint-filename-completion + pcomplete-completions-at-point) "List of functions called to perform completion. This variable is used to initialize `comint-dynamic-complete-functions' in the shell buffer." :type '(repeat function) - :group 'shell) + :group 'shell + :version "27.1") (defcustom shell-command-regexp "[^;&|\n]+" "Regexp to match a single command within a pipeline. -- 2.22.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-filename-completion-in-shell-mode-buffers.patch >From 1af4915f3dc774b4fb53e2b52b1318f4b52b7ba3 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Thu, 15 Aug 2019 11:02:38 -0500 Subject: [PATCH] Fix filename completion in shell mode buffers * lisp/shell.el (shell-dynamic-complete-functions): Move pcomplete-completions-at-point down the list so that filename completion has a chance to complete before pcompletion. Fixes bug#34330 --- lisp/shell.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/shell.el b/lisp/shell.el index 2914d1d2c8..889602d26e 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -184,14 +184,15 @@ shell buffer. The value may depend on the operating system or shell." shell-environment-variable-completion shell-command-completion shell-c-a-p-replace-by-expanded-directory - pcomplete-completions-at-point shell-filename-completion - comint-filename-completion) + comint-filename-completion + pcomplete-completions-at-point) "List of functions called to perform completion. This variable is used to initialize `comint-dynamic-complete-functions' in the shell buffer." :type '(repeat function) - :group 'shell) + :group 'shell + :version "27.1") (defcustom shell-command-regexp "[^;&|\n]+" "Regexp to match a single command within a pipeline. -- 2.22.0 --=-=-=--