Re: Idea: *.p completion

2019-09-01 Thread Eli Schwartz
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

Re: Idea: *.p completion

2019-09-01 Thread Chet Ramey
On 9/1/19 2:29 PM, Dennis Clarke wrote: > On 9/1/19 11:10 AM, 積丹尼 Dan Jacobson wrote: >> $ ls *.pdf >> a.pdf  b.pdf >> $ diff *.p >> >> At this point should complete "*.pdf". >> >> Or maybe as a bonus it could complete "a.pdf  b.pdf" via a different key. >> > > So long as all these extensions and

Re: Idea: *.p completion

2019-09-01 Thread Chet Ramey
On 9/1/19 2:35 PM, 積丹尼 Dan Jacobson wrote: > CR> I'm saying that's what the default bash completion code does. The default > CR> bash completion code leaves the word unchanged. > > Yes. That's why I'm saying wouldn't it be neat if it made > *.p into *.pdf? What harm could possibly happen? I don't

Re: Idea: *.p completion

2019-09-01 Thread 積丹尼 Dan Jacobson
CR> I'm saying that's what the default bash completion code does. The default CR> bash completion code leaves the word unchanged. 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

Re: Idea: *.p completion

2019-09-01 Thread Dennis Clarke
On 9/1/19 11:10 AM, 積丹尼 Dan Jacobson wrote: $ ls *.pdf a.pdf b.pdf $ diff *.p At this point should complete "*.pdf". Or maybe as a bonus it could complete "a.pdf b.pdf" via a different key. So long as all these extensions and ideas get turned off by the env var POSIXLY_CORRECT then the sh

Re: Idea: *.p completion

2019-09-01 Thread Chet Ramey
On 9/1/19 2:00 PM, 積丹尼 Dan Jacobson wrote: >> "CR" == Chet Ramey writes: > CR> On 9/1/19 11:10 AM, 積丹尼 Dan Jacobson wrote: >>> $ ls *.pdf >>> a.pdf b.pdf >>> $ diff *.p >>> >>> At this point should complete "*.pdf". > > CR> It does (well, the default completion does, maybe programmable comp

Re: Idea: *.p completion

2019-09-01 Thread 積丹尼 Dan Jacobson
> "CR" == Chet Ramey writes: CR> On 9/1/19 11:10 AM, 積丹尼 Dan Jacobson wrote: >> $ ls *.pdf >> a.pdf b.pdf >> $ diff *.p >> >> At this point should complete "*.pdf". CR> It does (well, the default completion does, maybe programmable completion CR> for diff does too). But the two possible co

Re: Idea: *.p completion

2019-09-01 Thread Chet Ramey
On 9/1/19 11:10 AM, 積丹尼 Dan Jacobson wrote: > $ ls *.pdf > a.pdf b.pdf > $ diff *.p > > At this point should complete "*.pdf". It does (well, the default completion does, maybe programmable completion for diff does too). But the two possible completions differ immediately -- in the first charac

Idea: *.p completion

2019-09-01 Thread 積丹尼 Dan Jacobson
$ ls *.pdf a.pdf b.pdf $ diff *.p At this point should complete "*.pdf". Or maybe as a bonus it could complete "a.pdf b.pdf" via a different key.