Skip to content

Commit 98b1205

Browse files
committed
Remove print()
1 parent c20e410 commit 98b1205

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

tmuxp/cli.py

-27
Original file line numberDiff line numberDiff line change
@@ -888,13 +888,6 @@ def command_shell(
888888
else:
889889
current_pane = util.get_current_pane(server=server)
890890

891-
try:
892-
current_session = session = util.get_session(
893-
server=server, current_pane=current_pane
894-
)
895-
except Exception:
896-
current_session = None
897-
898891
try:
899892
session = util.get_session(
900893
server=server, session_name=session_name, current_pane=current_pane
@@ -909,26 +902,6 @@ def command_shell(
909902
else:
910903
return
911904

912-
if current_session is not None and current_session.id != session.id:
913-
print("in")
914-
if not detached and (
915-
answer_yes
916-
or click.confirm(
917-
"Switch / attach to %s and run shell from there?"
918-
% click.style(session_name, fg="green"),
919-
default=True,
920-
)
921-
):
922-
if current_session.id != session.id:
923-
session.attached_window.attached_pane.send_keys(
924-
"tmuxp shell", enter=True
925-
)
926-
if "TMUX" in os.environ:
927-
session.switch_client()
928-
else:
929-
session.attach_session()
930-
return
931-
932905
if current_pane["session_id"] != session.id:
933906
current_pane = None
934907

tmuxp/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,11 @@ def get_window(session, window_name=None, current_pane=None):
142142
raise exc.TmuxpException("Window not found: %s" % window_name)
143143
elif current_pane is not None:
144144
print("get_window: current_pane")
145+
145146
window = session.find_where({"window_id": current_pane["window_id"]})
146147
else:
147148
print("get_window: else")
148149
window = session.list_windows()[0]
149-
150150
print(f"get_window: {window}")
151151

152152
return window

0 commit comments

Comments
 (0)