On 1/16/12 3:54 PM, Sung Pae wrote: > The only issue then is that completing a bare `<`, `>` and `>>` results > in the default completion command receiving the redirection operator as > its first argument. The manual, however, states (my emphasis): > > For instance, assuming that there is a library of compspecs, > each kept in a file corresponding to the *name of the command*, > the following default completion function would load completions > dynamically: > > _completion_loader() > { > . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124 > } > complete -D -F _completion_loader > > Is it not reasonable then that _completion_loader should receive the > empty string instead of the redirection operator in this corner case?
That's an excellent point. It's a case of these corner cases violating one of the assumptions the programmable completion code makes. I know how to fix it -- the correct information exists, and is used to search for the right compspec. That null command just needs to be passed to the right function. This fix will be in the next version of bash. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/