# HG changeset patch # User souliane # Date 1412411170 -7200 # Node ID 82dabb442e2ee17fa7966ec51c1dcd0613c822c9 # Parent f0c9b149ed99fe982a6065d85c25e8ff7c6c88e1 frontends (primitivus): new command :search diff -r f0c9b149ed99 -r 82dabb442e2e frontends/src/primitivus/primitivus --- a/frontends/src/primitivus/primitivus Sat Oct 04 10:25:32 2014 +0200 +++ b/frontends/src/primitivus/primitivus Sat Oct 04 10:26:10 2014 +0200 @@ -18,7 +18,7 @@ # along with this program. If not, see . -from sat.core.i18n import _ +from sat.core.i18n import _, D_ from sat_frontends.primitivus.constants import Const as C from sat.core import log_config log_config.satConfigure(C.LOG_BACKEND_STANDARD, C) @@ -145,6 +145,15 @@ win.clearHistory() if limit > 0: win.historyPrint(size=limit, profile=self.app.profile) + elif command == 'search': + pattern = " ".join(args) + if not pattern: + self.app.notif_bar.addMessage(D_("Please specify the globbing pattern to search for")) + win = self.app.chat_wins[JID(self.app.contact_list.selected).bare] + win.clearHistory() + win.printInfo(D_("Results for searching the globbing pattern: %s") % pattern, timestamp=0) + win.historyPrint(size=C.HISTORY_LIMIT_NONE, search=pattern, profile=self.app.profile) + win.printInfo(D_("Type ':history ' to reset the chat history")) else: return self.set_edit_text('')