Sample Header Ad - 728x90

Disable command+filename completion in bash readline

1 vote
0 answers
38 views
I'm trying to use "read -e" to implement a user prompt with custom commands. For this I must disable the default command+filename completion. I tried this: complete -W 'cmd1 cmd2 cmd3' -D and indeed pressing tab once on an empty prompt started with "c", but pressing it twice did not present cmd1 cmd2 cmd3, instead the usual bash aliases/OS programs in the PATH starting with "c". Any tips on how to do what I want? It seems there's "set disable-completion on" , but no "set disable-os-command-completion" or something similar. Thanks.
Asked by Rihad (21 rep)
Jun 19, 2025, 08:50 AM
Last activity: Jun 19, 2025, 11:00 AM