Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson Newsgroups: gnu.bash.bug Subject: Re: Idea: *.p completion Date: Mon, 02 Sep 2019 02:00:01 +0800 Lines: 43 Approved: bug-bash@gnu.org Message-ID: References: <878sr88336.5.fsf@jidanni.org> <9e4e91b3-34a1-72b3-ba8d-bd9d0e31e4a7@case.edu> <87woer7v8e.5.fsf@jidanni.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1567360821 1886 209.51.188.17 (1 Sep 2019 18:00:21 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org To: Chet Ramey Envelope-to: bug-bash@gnu.org X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@jidanni.org X-MailChannels-Auth-Id: dreamhost X-Spot-Plucky: 38414ff43f2a6421_1567360813021_723586136 X-MC-Loop-Signature: 1567360813021:617265175 X-MC-Ingress-Time: 1567360813020 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc :subject:references:date:message-id:mime-version:content-type :content-transfer-encoding; s=jidanni.org; bh=xssDOXfCMfU5yD84J8 pRh1TwU+Q=; b=nJyj5VhdYROaNTFJPxZmdXdN31cFdfHb8be45vMT5YzNG7eMX7 ppsyp/659sn0A8nN1Rq2t+DXOPf4ee3Ao/dU9YatUI6V3JqMPR/Mp/qVe2o8OJMG IuRM/WoFXZxGQy79b7JrjE4++jmeJyTdATKCp/aMsigOKLGMNi/y1sluw= X-DH-BACKEND: pdx1-sub0-mail-a96 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrudeikedgudduiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufhffkfggtgfgsehtkeertddttdejnecuhfhrohhmpejnnjjnucffrghnucflrggtohgsshhonhcuoehjihgurghnnhhisehjihgurghnnhhirdhorhhgqeenucfkphepuddugedrgedurddvvddrjedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehjihgurghnnhhirdhorhhgpdhinhgvthepuddugedrgedurddvvddrjedvpdhrvghtuhhrnhdqphgrthhhpeeprehuthhfqdekreeureehiehmpfehnfhiheehsgevkeerpecuffgrnhculfgrtghosghsohhnuceojhhiuggrnhhnihesjhhiuggrnhhnihdrohhrgheqpdhmrghilhhfrhhomhepjhhiuggrnhhnihesjhhiuggrnhhnihdrohhrghdpnhhrtghpthhtohepsghughdqsggrshhhsehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 23.83.209.48 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <87woer7v8e.5.fsf@jidanni.org> X-Mailman-Original-References: <878sr88336.5.fsf@jidanni.org> <9e4e91b3-34a1-72b3-ba8d-bd9d0e31e4a7@case.edu> Xref: csiph.com gnu.bash.bug:15340 >>>>> "CR" =3D=3D Chet Ramey writes: CR> On 9/1/19 11:10 AM, =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson wrote: >> $ ls *.pdf >> a.pdf b.pdf >> $ diff *.p >>=20 >> At this point should complete "*.pdf". CR> It does (well, the default completion does, maybe programmable comple= tion CR> for diff does too). But the two possible completions differ immediate= ly -- CR> in the first character -- so what are you going to do? Rather than re= move CR> the word, as normal completion would do, the default bash completion = leaves CR> it alone. I'm saying I want a real "* . p d f" as the result, I.e., genuine * 0x2A asterisk left sitting upon the screen. diff is just an example. Maybe use the generic ":" command instead. (Yes I wish to disable /usr/share/bash-completion effects while testing, though it is on by default in Debian.) >> Or maybe as a bonus it could complete "a.pdf b.pdf" via a different k= ey. CR> You want it to insert the possible completions? Use C-x* in emacs mod= e: CR> glob-expand-word (C-x *) CR> The word before point is treated as a pattern for pathna= me CR> expansion, and the list of matching filenames is inserte= d, CR> replacing the word. If a numeric argument is supplied, = an CR> asterisk is appended before pathname expansion. Well that can deal with "*" but not "*.p".