It's certainly something that could be done, but also something that shouldn't be done. You would have to make modifications to every possible shell the user might want to use, and these would only be a feature usable in a very select few terminal emulators. It creates way more work because, in short, it's a violation of the Unix design philosophy.
EDIT: The way you'd do this is to provide additional functionality to the shell, not to the terminal.
(Haven't noticed your reply; my guess is you won't notice mine now... oh well)
> It's certainly something that could be done, but also something that shouldn't be done.
I was just thinking out loud how it could be done, so I don't see any disagreement here.
> You would have to make modifications to every possible shell the user might want to use, and these would only be a feature usable in a very select few terminal emulators.
Well, it'd be optional addition. Furthermore...
> It creates way more work because, in short, it's a violation of the Unix design philosophy.
Already shells attempt to detect if your terminal support color output, scrolling etc.
Your shell would still go around its usual business (e.g. auto-completion), the only thing that changes is how you're going to present that functionality to the user. And if terminal you're outputting to is happy to provide a popup, then why not use it? I don't see how that violates Unix design philosophy.
> EDIT: The way you'd do this is to provide additional functionality to the shell, not to the terminal.
Yes, that seems to be more accurate. The shell would make use of the additional capabilities provided by terminal.
I'm not convinced auto-completion is one of them though. But hey, if you like GUI popups better it's certainly hackable!