New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally disable shell history suppression #146

Merged
merged 4 commits into from May 16, 2016

Conversation

Projects
None yet
4 participants
@kmactavish
Contributor

kmactavish commented May 12, 2016

This PR closes #144.

Adds the suppress_history option to override the default shell history suppression, for the workspace_builder only. The flag can be set at the session, window, or pane level, and defaults to True (the only existing option before this PR).

Documentation and examples have been added as well.

@coveralls

This comment has been minimized.

coveralls commented May 12, 2016

Coverage Status

Coverage decreased (-0.04%) to 63.764% when pulling 67e9a2f on kmactavish:feature/suppress_bash_history into f0e5600 on tony:master.

@coveralls

This comment has been minimized.

coveralls commented May 12, 2016

Coverage Status

Coverage increased (+0.2%) to 64.02% when pulling 1ae194f on kmactavish:feature/suppress_bash_history into f0e5600 on tony:master.

@kmactavish

This comment has been minimized.

Contributor

kmactavish commented May 13, 2016

After finishing this patch and digging through the code, I'm thinking that #46 was in fact a regression.

It was made so that non starting-shell-commands wouldn't spam the history, but should have stayed how it was for WorkspaceBuilder calls.

If that's the case, then this PR can be reduced to the suppress_history flag in send_keys that defaults to True, and hard-coding it to False in the WorkspaceBuilder.

@@ -75,7 +75,7 @@ def cmd(self, cmd, *args, **kwargs):
return self.server.cmd(cmd, *args, **kwargs)
def send_keys(self, cmd, enter=True):
def send_keys(self, cmd, enter=True, suppress_history=True):
"""``$ tmux send-keys`` to the pane.

This comment has been minimized.

@tony

tony May 13, 2016

Member

Docstring here would be nice too (it ends up showing in api docs)

@coveralls

This comment has been minimized.

coveralls commented May 13, 2016

Coverage Status

Coverage increased (+0.2%) to 64.02% when pulling 4785b5c on kmactavish:feature/suppress_bash_history into f0e5600 on tony:master.

@@ -85,6 +85,8 @@ def send_keys(self, cmd, enter=True, suppress_history=True):
:type cmd: str
:param enter: Send enter after sending the input.
:type enter: bool
:param suppress_history: Don't add these keys to the shell history
:type suppress_history: bool

This comment has been minimized.

@tony

tony May 13, 2016

Member

👍

# Something went wrong
else:
self.assertTrue(False)

This comment has been minimized.

@tony

tony May 16, 2016

Member

wow

This comment has been minimized.

@kmactavish

kmactavish May 16, 2016

Contributor

Not pretty 😁 .

This comment has been minimized.

@ThiefMaster

ThiefMaster May 16, 2016

Contributor

🐒

@tony tony merged commit b409368 into tmux-python:master May 16, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.2%) to 64.02%
Details

@kmactavish kmactavish deleted the kmactavish:feature/suppress_bash_history branch May 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment