From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mogw0940.ocn.ad.jp (mogw0940.ocn.ad.jp [153.149.227.46]) by dpdk.org (Postfix) with ESMTP id 2633C2C18 for ; Tue, 6 Mar 2018 11:51:18 +0100 (CET) Received: from mf-smf-ucb019c3 (mf-smf-ucb019c3.ocn.ad.jp [153.153.66.132]) by mogw0940.ocn.ad.jp (Postfix) with ESMTP id 94291F00483; Tue, 6 Mar 2018 19:51:16 +0900 (JST) Received: from ntt.pod01.mv-mta-ucb024 ([153.149.142.98]) by mf-smf-ucb019c3 with ESMTP id tABeedMOEDyE1tABgeHLYT; Tue, 06 Mar 2018 19:51:16 +0900 Received: from smtp.ocn.ne.jp ([153.149.227.165]) by ntt.pod01.mv-mta-ucb024 with id JarG1x0033akymp01arG8P; Tue, 06 Mar 2018 10:51:16 +0000 Received: from localhost.localdomain (sp1-66-103-93.msc.spmode.ne.jp [1.66.103.93]) by smtp.ocn.ne.jp (Postfix) with ESMTPA; Tue, 6 Mar 2018 19:51:16 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: ferruh.yigit@intel.com, spp@dpdk.org Cc: Yasufumi Ogawa Date: Tue, 6 Mar 2018 19:50:48 +0900 Message-Id: <20180306105055.65210-7-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20180306105055.65210-1-ogawa.yasufumi@lab.ntt.co.jp> References: <20180306105055.65210-1-ogawa.yasufumi@lab.ntt.co.jp> Subject: [spp] [PATCH 06/13] controller: add filter for py to compl_common X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 10:51:18 -0000 From: Yasufumi Ogawa To filter python code with comple_common() method, add a case for matching '.py' source files. Signed-off-by: Yasufumi Ogawa --- src/controller/shell_lib/common.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controller/shell_lib/common.py b/src/controller/shell_lib/common.py index d011684..b4e8fb9 100644 --- a/src/controller/shell_lib/common.py +++ b/src/controller/shell_lib/common.py @@ -66,6 +66,10 @@ def compl_common(text, line, ftype=None): for fn in res: if fn[-1] == '/': completions.append(fn) + elif ftype == 'py' or ftype == 'python': + for fn in res: + if fn[-3:] == '.py': + completions.append(fn) elif ftype == 'file': for fn in res: if fn[-1] != '/': -- 2.13.1