Probably not. Or, at least, it will be really complex. The problem here is that
foo= is interpreted by bash as an attempt to set the variable
foo to something. So, when you hit tab it tries to complete with the names of the files in the current directory. It isn't actually completing
foo=, it is starting a whole new glob from nothing. Note that it takes two tabs to complete
To illustrate, you can see the same behavior even if there are no files starting with
foo= and pressing Tab results in:
$ foo= ## first tab does nothing
bar baz ## both file names are printed.
I doubt there's going to be any way around this since this is a basic function of the shell and the primary way to define variables.
I can think of two workarounds. Either escape the
$ ls foo\= ## hit tab
$ ls foo\=bar
Or use quotes:
$ ls 'foo= ## hit tab
$ ls 'foo=bar' ## yes, the final quote is added by the shell.
Hitting Tab now will expand the file name correctly.