Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15346
| Path | csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Eli Schwartz <eschwartz@archlinux.org> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: Idea: *.p<TAB> completion |
| Date | Sun, 1 Sep 2019 15:15:21 -0400 |
| Lines | 110 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.286.1567365336.2075.bug-bash@gnu.org> (permalink) |
| References | <878sr88336.5.fsf@jidanni.org> <9e4e91b3-34a1-72b3-ba8d-bd9d0e31e4a7@case.edu> <87woer7v8e.5.fsf@jidanni.org> <35b9428b-2eb7-036f-9c17-83dd71a8e0f3@case.edu> <87o9037tki.5.fsf@jidanni.org> <9a4be5fd-dd8c-c31e-ecd7-36d8f9c9c4fb@archlinux.org> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pwLZPEdppyjlM11EWCabL6txfaUvjAaII" |
| X-Trace | usenet.stanford.edu 1567365337 5014 209.51.188.17 (1 Sep 2019 19:15:37 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash@gnu.org |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=orion; t=1567365324; bh=f9yfbvZ4ym4lRBNDPFCIRvtC1+eO2/1Lg59rEFAkks4=; h=Subject:To:References:From:Date:In-Reply-To; b=oBKiE76+C+Xe0v+5BiW6S5T97fPr6vQ0xoSDQ6+BqH2FmAWkkVLjVcArwFyL3Q8lh 9rZ7U7tgKM7Uki2K6yf7cEnXVLDOH+IomO//UzHADs+cDdPhu3D9qima5KvcsFLfrj L03zI3quZEp5uSEiQx/rAGYN/oERCiX7qo4Q56DfTXISJIc7GWGf6JkhQ402X9DDnC ew+NV07o3eMyFxWqdNlI6kVv7rKnnmPfti1Ww9uwCLEHIm0Z1Gpp37t3OtwjqKThef 8K+pBjsqoRXFuD3C22R04p1KRuujYsO0uCcMkEO5lmeet56F3O99/iNy9HxMg96NHw 882NLg1c7rEbDuNZqgJzmpZe4sdhZLf8/g3+COeipiibwNsBF0a3H0uohc1lBXr6pa 7wkOKj2PihDGPzSEAZfwggOP1L5sNhdh52HZcSMW+jmG5g1mogXhZpOe1cQALpthZk Rk/CcYHAuv+hdOIqqnMnzlEAJHa8UZwtsfPdvdALi2+lAvS1Hsm2DUzcL8AOzAKGva Dtq2H4t2ClE/g8/+apV8BcLxWzqJakODPGRQanK9rukAGkRHWiUXIK7I76FqdG8jHc BWSMWlU+sJo0Ki45rJJO1t281294kRuZO/Z+KAsPesDYiRJF0tjUFQuKfw5R5HUbDx pIjUngC0J+mwpMBllrBmTRhs= |
| Openpgp | preference=signencrypt |
| X-Clacks-Overhead | GNU Terry Pratchett |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
| In-Reply-To | <87o9037tki.5.fsf@jidanni.org> |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] |
| X-Received-From | 88.198.91.70 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.23 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <https://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <9a4be5fd-dd8c-c31e-ecd7-36d8f9c9c4fb@archlinux.org> |
| X-Mailman-Original-References | <878sr88336.5.fsf@jidanni.org> <9e4e91b3-34a1-72b3-ba8d-bd9d0e31e4a7@case.edu> <87woer7v8e.5.fsf@jidanni.org> <35b9428b-2eb7-036f-9c17-83dd71a8e0f3@case.edu> <87o9037tki.5.fsf@jidanni.org> |
| Xref | csiph.com gnu.bash.bug:15346 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On 9/1/19 2:35 PM, 積丹尼 Dan Jacobson wrote: > Yes. That's why I'm saying wouldn't it be neat if it made > *.p into *.pdf? What harm could possibly happen? > The idea being if the user has handed it an asterisk, > then he wants that asterisk to still be in the result. Why should shell completion be responsible for auto-filling your globbed search pattern? Let's say it did, in fact, auto-fill your globbed search pattern. What if I had a bunch of files in my current directory: a.pdf b.pdf hello_world.py *.pl What should *.p complete to? It could be *.pdf or *.py or *.pl, and since the shell doesn't know which one I want, it won't complete either -- instead, it will print them to the screen and let me choose. But then that's going to confuse me, because the completions will list two globs (*.pdf and *.py) and one actual literal filename *.pl (because my example persona is a weird person with weird taste in filenames). Which one do I want? And my expectation as a user is that tab-completing a filename should only offer me real filename suggestions (which AFAIK seems to currently be the case), and I would get quite freaked out if bash started completing glob patterns too. I would be freaked out enough to report a bug and demand an option to disable this behavior (and offer my opinion that disabling it should be the default). ... What is even the purpose of this anyway? If you only have .pdf files, your glob can be *.p* and it works as-is, it is even the same number of keys. If you have multiple possible suffixes, bash won't even complete it for you, but only fill out the unambiguous characters and then make you finish the rest -- so use * instead of tab, and then fill out the rest anyway. You are already using a glob, I would expect that your glob has a highly specific use case which you know more about than bash does. I'm sure there is some trivial glob suffix you can use which is as few keypresses or less than anything bash could do for you, and is as a bonus generally portable between shells and even different point releases of bash. -- Eli Schwartz Arch Linux Bug Wrangler and Trusted User
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Idea: *.p<TAB> completion Eli Schwartz <eschwartz@archlinux.org> - 2019-09-01 15:15 -0400
csiph-web