Mercurial > libervia-backend
changeset 1225:82dabb442e2e
frontends (primitivus): new command :search <pattern>
author | souliane <souliane@mailoo.org> |
---|---|
date | Sat, 04 Oct 2014 10:26:10 +0200 |
parents | f0c9b149ed99 |
children | 72f25d671368 |
files | frontends/src/primitivus/primitivus |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 <http://www.gnu.org/licenses/>. -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 <lines>' to reset the chat history")) else: return self.set_edit_text('')