It would be shortsighted to do this only for grep. A better approach would be to set PROMPT_COMMAND for the shell in /etc/bash.bashrc to an appropriate shell function. The last command executed is available as `history 1` in that handler:
--- bash.bashrc.orig 2012-09-27 16:52:30.452001532 +0100 +++ bash.bashrc 2012-09-27 16:54:24.312515801 +0100 @@ -53,3 +53,6 @@ fi } fi + +PROMPT_COMMAND='/usr/lib/ubuntu-amazon/prompthandler "$(history 1)"' + The handler can then work out what sort of output the user really wanted to see in their shell based on the command given and also the arguments. Commands like "nslookup", "dig" and "hosts" could offer registration deals from GoDaddy. Commands like "passwd" could offer to sell the user books on managing security policies. Commands like "vlc", "mplayer" could could sell videos and music. Communicating the command and arguments to an external server would presumably be necessary, but I can't imagine anyone objecting to that. -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gnome-terminal in Ubuntu. https://bugs.launchpad.net/bugs/1055766 Title: grep -R doesn't automatically search amazon To manage notifications about this bug go to: https://bugs.launchpad.net/ayatana-design/+bug/1055766/+subscriptions -- desktop-bugs mailing list desktop-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/desktop-bugs