Re: glob-expand-word and vi-command mode

2024-02-05 Thread Chet Ramey
On 2/3/24 6:23 PM, Mike Jonkmans wrote: esc * is bound to insert-completions It's bound to vi-complete, which bash replaces with something that does the pathname expansion that POSIX requires. How can I find this out? You can assume that the bash vi mode behaves as POSIX specifies: https:

Re: glob-expand-word and vi-command mode

2024-02-03 Thread Mike Jonkmans
On Sat, Feb 03, 2024 at 04:59:08PM -0500, Chet Ramey wrote: > On 2/2/24 5:15 PM, Mike Jonkmans wrote: > > On Fri, Feb 02, 2024 at 09:50:46AM -0500, Greg Wooledge wrote: > > > On Fri, Feb 02, 2024 at 03:39:54PM +0100, Mike Jonkmans wrote: > > > > [ mkdir test; cd test; touch file1 file2 ] > > > > Go

Re: glob-expand-word and vi-command mode

2024-02-03 Thread Mike Jonkmans
On Sat, Feb 03, 2024 at 03:43:45PM -0500, Chet Ramey wrote: > On 2/2/24 9:39 AM, Mike Jonkmans wrote: > > From the manual, glob-expand-word: > > glob-expand-word doesn't work that great in vi command mode, mostly for > the reasons you suspect. What made you use it over the standard vi mode > bind

Re: glob-expand-word and vi-command mode

2024-02-03 Thread Chet Ramey
On 2/2/24 5:15 PM, Mike Jonkmans wrote: On Fri, Feb 02, 2024 at 09:50:46AM -0500, Greg Wooledge wrote: On Fri, Feb 02, 2024 at 03:39:54PM +0100, Mike Jonkmans wrote: [ mkdir test; cd test; touch file1 file2 ] Going into `vi-command' mode on the line `ls *' puts the cursor on the `*'. Then `glo

Re: glob-expand-word and vi-command mode

2024-02-03 Thread Chet Ramey
On 2/2/24 9:39 AM, Mike Jonkmans wrote: From the manual, glob-expand-word: The word before point is treated as a pattern for pathname expansion, and the list of matching filenames is inserted, replacing the word. If a numeric argument is supplied, an asterisk is appended before pathn

Re: glob-expand-word and vi-command mode

2024-02-02 Thread Mike Jonkmans
On Fri, Feb 02, 2024 at 09:50:46AM -0500, Greg Wooledge wrote: > On Fri, Feb 02, 2024 at 03:39:54PM +0100, Mike Jonkmans wrote: > > [ mkdir test; cd test; touch file1 file2 ] > > > > Going into `vi-command' mode on the line `ls *' puts the cursor on the `*'. > > Then `glob-expand-word' does nothin

Re: glob-expand-word and vi-command mode

2024-02-02 Thread Greg Wooledge
On Fri, Feb 02, 2024 at 03:39:54PM +0100, Mike Jonkmans wrote: > [ mkdir test; cd test; touch file1 file2 ] > > Going into `vi-command' mode on the line `ls *' puts the cursor on the `*'. > Then `glob-expand-word' does nothing with the `*', it just inserts a space. > Resulting in `ls *' (cursor s

glob-expand-word and vi-command mode

2024-02-02 Thread Mike Jonkmans
>From the manual, glob-expand-word: The word before point is treated as a pattern for pathname expansion, and the list of matching filenames is inserted, replacing the word. If a numeric argument is supplied, an asterisk is appended before pathname expansion. [ With a block cursor, `before