From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tama50.ecl.ntt.co.jp (tama50.ecl.ntt.co.jp [129.60.39.147]) by dpdk.org (Postfix) with ESMTP id 0F79F5B3E for ; Thu, 18 Oct 2018 13:27:48 +0200 (CEST) Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id w9IBRmOX020326; Thu, 18 Oct 2018 20:27:48 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id E8B84639489; Thu, 18 Oct 2018 20:27:47 +0900 (JST) Received: from localhost.localdomain (unknown [129.60.13.51]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id D1085639462; Thu, 18 Oct 2018 20:27:47 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp Date: Thu, 18 Oct 2018 20:27:35 +0900 Message-Id: <20181018112737.77626-4-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20181018112737.77626-1-ogawa.yasufumi@lab.ntt.co.jp> References: <20181018112737.77626-1-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 3/5] controller: move spp_history to home directory 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: Thu, 18 Oct 2018 11:27:49 -0000 From: Yasufumi Ogawa Move history file from project root to user's home directory as '~/.spp_history'. Signed-off-by: Yasufumi Ogawa --- src/controller/shell.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/controller/shell.py b/src/controller/shell.py index 2c170e9..383d2f1 100644 --- a/src/controller/shell.py +++ b/src/controller/shell.py @@ -19,17 +19,15 @@ import subprocess class Shell(cmd.Cmd, object): """SPP command prompt.""" - # TODO(yasufum) move hist_file to $HOME as default - hist_file = '.spp_history' + recorded_file = None + hist_file = os.path.expanduser('~/.spp_history') + HIST_EXCEPT = ['bye', 'exit', 'history', 'redo'] intro = 'Welcome to the spp. Type help or ? to list commands.\n' prompt = 'spp > ' - recorded_file = None PORT_TYPES = ['phy', 'ring', 'vhost', 'pcap', 'nullpmd'] - HIST_EXCEPT = ['bye', 'exit', 'history', 'redo'] - PLUGIN_DIR = 'plugins' topo_size = '60%' -- 2.13.1