>
> The easiest way I see to do this is to be able to provide a proc to the
> Readline.completion_append_character variable rather than a string, and
> have the completed command string passed to the proc.  ¨Âèé÷áù¬ ïîãá> determine if the string is a command, a directory, or a file and return
> the appropriate append string.

I guess. I would just set Readline.completion_append_character right
in the proc itself.
But if you do it for one, then you'd have to do it for all completion
cases.

<shameless plug> If you want to give your completion proc the full
line you've typed along
with a powerful completion dsl, check out bond:
http://github.com/cldwalker/bond/tree/master#readme

Gabriel