Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sometimes the redirect does not expand in bash completion

Sometimes when I do the following

somecmd arg1 arg2 > ~/Deskto<TAB>

it correctly expands to "Desktop". Other times when I do it it does not expand. Is this the fault of bash or of the command? My guess is it is the fault of bash because it works even when the command has no completion. How do I investigate the root problem?

like image 573
Xu Wang Avatar asked Dec 05 '25 15:12

Xu Wang


1 Answers

This is the fault of the programmable completion for this command.

You can:

  1. Use filename completion instead of programmable completion for that argument:

    somecmd arg1 arg2 > ~/DesktoAlt+/

  2. Disable programmable completion for that command:

    complete -r yourcommand

like image 96
that other guy Avatar answered Dec 07 '25 05:12

that other guy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!