0

I am trying to get "glob-expand-word" to work

pi@raspberrypi:~ $ cat .inputrc
set editing-mode vi
set keymap vi
set show-all-if-ambiguous on
Control-o: "> output"
pi@raspberrypi:~/tmp/test4 $ ls
total 8.0K
drwxr-xr-x 10 pi pi 4.0K Jan 27 08:48 ..
-rw-r--r--  1 pi pi    0 Jan 27 08:48 3_eng
-rw-r--r--  1 pi pi    0 Jan 27 08:48 2_eng
-rw-r--r--  1 pi pi    0 Jan 27 08:48 1_eng
drwxr-xr-x  2 pi pi 4.0K Jan 27 08:48 .
pi@raspberrypi:~/tmp/test4 $ ls *eng^X

When trying to do the ctrlx, * (a two stroke combo) it doesn't work - instead of auto-completing and outputting "ls 1_eng 2_eng 3_eng" it instead appends ^X

What can I try next?

halfer
  • 19,824
  • 17
  • 99
  • 186
dewijones92
  • 1,319
  • 2
  • 24
  • 45
  • Are you sure that `.inputrc` is the correct location? This file configures the general _readline_ behaviour for any programs which want to use _readline_ (for instance, `ftp`), and they don't necessarily know about filenam completion. I have the command in my `.bashrc` instead, and it works well there. However, I have **in addition** `set show-all-if-unmodified on` as well. – user1934428 Jan 27 '23 at 09:23
  • 1
    @user1934428 **.inputrc** is the correct location. I even started a docker instance of bash to isolate the issue – dewijones92 Jan 29 '23 at 07:06

1 Answers1

0

Try to bind ctrl-x :

bind '"\C-x": glob-list-expansions'
# Then -> ls *eng^X
Philippe
  • 20,025
  • 2
  • 23
  • 32