Skip to content

Add method display_message to Pane #119

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

Merged
merged 1 commit into from
May 20, 2018
Merged

Conversation

ritiek
Copy link
Contributor

@ritiek ritiek commented May 18, 2018

Useful for displaying messages in a tmux session and doing stuff like:

>>> pane.display_message('#T', get_text=True)
'server.py (~/Downloads/libtmux/libtmux) - NVIM'

Here is a complete example:

# First create a Tmux session by yourself
# before running this example
# `$ tmux`

>>> import libtmux
>>> server = libtmux.Server()
>>> session = server.list_sessions()[0]
>>> pane = session.attached_pane
# Display a message "Hallo World!" in the tmux session
>>> pane.display_message('Hallo World!')
# Get current terminal title
>>> pane.display_message('#T', get_text=True)
['server.py (~/Downloads/libtmux/libtmux) - NVIM']

@codecov-io
Copy link

codecov-io commented May 18, 2018

Codecov Report

Merging #119 into master will decrease coverage by 0.25%.
The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
- Coverage   79.81%   79.55%   -0.26%     
==========================================
  Files           8        8              
  Lines         857      861       +4     
==========================================
+ Hits          684      685       +1     
- Misses        173      176       +3
Impacted Files Coverage Δ
libtmux/pane.py 82.81% <25%> (-3.86%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3417e11...34125fb. Read the comment docs.

@ritiek ritiek force-pushed the display-message branch from 727368a to 34125fb Compare May 18, 2018 19:57
@tony tony merged commit f014199 into tmux-python:master May 20, 2018
@ritiek ritiek deleted the display-message branch May 20, 2018 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants