From 00950017e039606fc321e4ded4e52de6489f71d4 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Sat, 31 Oct 2020 16:39:59 -0700 Subject: [PATCH 1/4] fixing the start_directory and -c bug in tmuxp --- tmuxp/workspacebuilder.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tmuxp/workspacebuilder.py b/tmuxp/workspacebuilder.py index 2cb36492609..df402b391a5 100644 --- a/tmuxp/workspacebuilder.py +++ b/tmuxp/workspacebuilder.py @@ -137,9 +137,15 @@ def build(self, session=None): 'Session name %s is already running.' % self.sconf['session_name'] ) else: - session = self.server.new_session( - session_name=self.sconf['session_name'] - ) + if 'start_directory' in self.sconf: + session = self.server.new_session( + session_name=self.sconf['session_name'], + start_directory=self.sconf['start_directory'] + ) + else: + session = self.server.new_session( + session_name=self.sconf['session_name'] + ) assert self.sconf['session_name'] == session.name assert len(self.sconf['session_name']) > 0 From e4a99bae34fc9a40ddfe391132526bc18da350ab Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Sat, 31 Oct 2020 16:41:46 -0700 Subject: [PATCH 2/4] running black and flake8 --- tests/test_cli.py | 4 ++-- tmuxp/workspacebuilder.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index c59b3b2bd8d..e966a4d849f 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -522,7 +522,7 @@ def test_import_tmuxinator(cli_args, inputs, tmpdir, monkeypatch): (['freeze'], ['\n', 'y\n', './exists.yaml\n', './la.yaml\n', 'y\n']), # Exists ( # Create a new one ['freeze', 'mysession', '--force'], - ['\n', 'y\n', './la.yaml\n', 'y\n'] + ['\n', 'y\n', './la.yaml\n', 'y\n'], ), ( # Imply current session if not entered ['freeze', '--force'], @@ -554,7 +554,7 @@ def test_freeze(server, cli_args, inputs, tmpdir, monkeypatch): ), ( # Imply current session if not entered ['freeze', '--force'], - ['\n', 'y\n', './exists.yaml\n', 'y\n'] + ['\n', 'y\n', './exists.yaml\n', 'y\n'], ), ], ) diff --git a/tmuxp/workspacebuilder.py b/tmuxp/workspacebuilder.py index df402b391a5..d24164f5f9e 100644 --- a/tmuxp/workspacebuilder.py +++ b/tmuxp/workspacebuilder.py @@ -140,7 +140,7 @@ def build(self, session=None): if 'start_directory' in self.sconf: session = self.server.new_session( session_name=self.sconf['session_name'], - start_directory=self.sconf['start_directory'] + start_directory=self.sconf['start_directory'], ) else: session = self.server.new_session( From 764f25167d459b09bf72459aad4afcb0b18cb508 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Sat, 31 Oct 2020 16:49:40 -0700 Subject: [PATCH 3/4] updating the version to 1.5.7post1 --- pyproject.toml | 2 +- tmuxp/__about__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0f331e75f6f..606c83f3f86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ skip-string-normalization = true [tool.poetry] name = "tmuxp" -version = "1.5.7post0" +version = "1.5.7post1" description = "tmux session manager" license = "MIT" authors = ["Tony Narlock "] diff --git a/tmuxp/__about__.py b/tmuxp/__about__.py index 24dc6167620..7795b24e4bb 100644 --- a/tmuxp/__about__.py +++ b/tmuxp/__about__.py @@ -1,6 +1,6 @@ __title__ = 'tmuxp' __package_name__ = 'tmuxp' -__version__ = '1.5.7post0' +__version__ = '1.5.7post1' __description__ = 'tmux session manager' __email__ = 'tony@git-pull.com' __author__ = 'Tony Narlock' From 086e1187c7813765c4168f90bee922f4bb37825e Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Sat, 31 Oct 2020 16:56:37 -0700 Subject: [PATCH 4/4] changing to version 1.5.8 --- CHANGES | 4 ++++ pyproject.toml | 2 +- tmuxp/__about__.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index f7e54b2c68f..f73699869bc 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,10 @@ current ------- - *Insert changes/features/fixes for next release here* +tmuxp 1.5.8 (2020-10-31) +----------------------- +- :issue: `631` Passes start_directory through to new tmux session + tmuxp 1.5.7 (2020-10-31) ------------------------ - :issue:`637` Support for loading directories with periods in it diff --git a/pyproject.toml b/pyproject.toml index 606c83f3f86..502c97247eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ skip-string-normalization = true [tool.poetry] name = "tmuxp" -version = "1.5.7post1" +version = "1.5.8" description = "tmux session manager" license = "MIT" authors = ["Tony Narlock "] diff --git a/tmuxp/__about__.py b/tmuxp/__about__.py index 7795b24e4bb..78db138f8f1 100644 --- a/tmuxp/__about__.py +++ b/tmuxp/__about__.py @@ -1,6 +1,6 @@ __title__ = 'tmuxp' __package_name__ = 'tmuxp' -__version__ = '1.5.7post1' +__version__ = '1.5.8' __description__ = 'tmux session manager' __email__ = 'tony@git-pull.com' __author__ = 'Tony Narlock'