Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWIP. Empty window titles cause errors. #183 #189
Conversation
Added functions for testing empty titles and a config window_title_empty.yaml.
|
I need some pointers on getting the window titles right. When the title is not set or empty, the title gets set to the shell (bash, in my case). |
|
can you rebase this against the latest codebase? |
|
Will do. |
|
Sorry for the late response, I am having issues keeping up with the project. I'm seeking maintainers @ #290. If you (or someone you know) may be interested in helping maintain libtmux or tmuxp, feel free to contact me by email or in the #290 issue. In the mean time, if you're still interested in this PR, can you rebase it via |
|
I'll rebase and see how it goes. I am interested in maintaining this project. |
|
If you're not able to rebase immediately, that's also fine, but if you do, ping me here. GitHub has an issue notifying me when force pushes happen (even when I'm watching). If you can pitch in time to help maintain, can you drop a message in #290? In addition to registering your interest and how much time you can commit, it would be encouraging for more people to come forward, too. My hope is to always have at least one person on duty and a quick turnaround time on issues/PRs. I'm wondering if we need a couple people? Other than that, ATM I'm working on some issues to streamline contributions/issues/debugging. I'm also weighing creating an organization for tmuxp/libtmux. |
|
Also, I didn't mention this, but after a |
|
Can you give this a rebase? @BlitzKraft |
|
@BlitzKraft Can you rebase? (giving you a ping) If I don't get a response, I may close the PR (I think?) - but you can still create a new PR if you / someone else regains interest in it |
|
Got it, I will rebase. |
|
Nice! That was quick. Welcome back @BlitzKraft |
Added functions for testing empty titles and a config window_title_empty.yaml.
|
Seems I might have messed up. Not sure how to fix. What do you suggest? |
|
Since you probably have the old ref : https://stackoverflow.com/a/10099285/1396928 You'd @BlitzKraft Would that help? |
Codecov Report
@@ Coverage Diff @@
## master #189 +/- ##
==========================================
- Coverage 77.08% 73.89% -3.19%
==========================================
Files 6 6
Lines 829 835 +6
Branches 238 241 +3
==========================================
- Hits 639 617 -22
- Misses 131 160 +29
+ Partials 59 58 -1
Continue to review full report at Codecov.
|
|
I think I got it. Did not reflog. I think this commit should be squashed. And I need to run the tests locally first. I keep forgetting to do that. |
|
@BlitzKraft Nice Are the new gh action tests helpful? They should detect if other functionality was affected / any tests added |
|
I think they are helpful. I haven't used them very much. I need to get a hang of that. |
|
Should I just ignore that? |
|
@BlitzKraft Does doing this and rerunning change anything?
Are you using poetry for this? e.g. |
|
(it's not a requirement but gives more piece of mind you have only the locked packages installed) |
|
I was missing some dependencies. Installing them using poetry, like you mentioned, I was able to run all the tests. There is still one failing test. |
|
@BlitzKraft see if this helps with the test |
| if w.name == '': | ||
| empty_window_title = True |
tony
Aug 17, 2020
Member
Suggested change
if w.name == '':
empty_window_title = True
empty_window_title = w.name == ''
Assures the variable is always declared
Should fix https://github.com/tmux-python/tmuxp/pull/189/checks?check_run_id=991200510#step:15:372:
wconf['panes'].append(pconf)
> if empty_window_title:
E UnboundLocalError: local variable 'empty_window_title' referenced before assignment
tmuxp/workspacebuilder.py:416: UnboundLocalError
| if w.name == '': | |
| empty_window_title = True | |
| empty_window_title = w.name == '' |
Assures the variable is always declared
Should fix https://github.com/tmux-python/tmuxp/pull/189/checks?check_run_id=991200510#step:15:372:
wconf['panes'].append(pconf)
> if empty_window_title:
E UnboundLocalError: local variable 'empty_window_title' referenced before assignment
tmuxp/workspacebuilder.py:416: UnboundLocalError
BlitzKraft
Aug 17, 2020
Author
That resolves the unbound variable. I am adding that change.
That resolves the unbound variable. I am adding that change.
| @@ -209,7 +209,10 @@ def expand(sconf, cwd=None, parent=None): | |||
| if 'session_name' in sconf: | |||
| sconf['session_name'] = expandshell(sconf['session_name']) | |||
| if 'window_name' in sconf: | |||
| sconf['window_name'] = expandshell(sconf['window_name']) | |||
| if not (sconf['window_name'] is None): | |||
tony
Aug 17, 2020
Member
Suggested change
if not (sconf['window_name'] is None):
if sconf['window_name'] is not None:
| if not (sconf['window_name'] is None): | |
| if sconf['window_name'] is not None: |
BlitzKraft
Aug 17, 2020
Author
This does not change the outcome of the test_window_title. As expected. The if statements - before and after the suggested changes - are equivalent. Were you expecting something different?
This does not change the outcome of the test_window_title. As expected. The if statements - before and after the suggested changes - are equivalent. Were you expecting something different?
BlitzKraft
Aug 17, 2020
Author
Found something. window_name is being set to tmux. Hence the failing assertion. Now, need to dig where this is happening.
Found something. window_name is being set to tmux. Hence the failing assertion. Now, need to dig where this is happening.
Added functions for testing empty titles and a config
window_title_empty.yaml.