From da4c98d00c9037d383a5a67feb845adc6a34abe8 Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 10 Jun 2014 01:10:20 +0100 Subject: [PATCH] jenkins.py allow commands in window without /jenkins --- jenkins.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jenkins.py b/jenkins.py index 1a5daac..ab7a978 100644 --- a/jenkins.py +++ b/jenkins.py @@ -23,6 +23,8 @@ The following commands are available: /jenkins settings - Show current settings /jenkins help - Show help +When in the jenkins window, the "/jenkins" part of the command can be omitted. + """ import prof @@ -220,7 +222,12 @@ def _prof_callback(): changes_list = None def _handle_input(win, line): - prof.win_show(win_tag, "Handled input.") + if line: + words = line.split() + if len(words) == 1: + _cmd_jenkins(words[0], None) + elif len(words) == 2: + _cmd_jenkins(words[0], words[1]) def _list_jobs(): if job_list and job_list.get_jobs():