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
Improved option management, add hook management #516
Open
tony
wants to merge
39
commits into
master
Choose a base branch
from
improved-options
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tony
force-pushed
the
improved-options
branch
from
February 7, 2024 16:28
6cd43f0
to
3399c7d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #516 +/- ##
==========================================
- Coverage 88.54% 87.65% -0.89%
==========================================
Files 36 41 +5
Lines 3927 4878 +951
Branches 570 720 +150
==========================================
+ Hits 3477 4276 +799
- Misses 308 414 +106
- Partials 142 188 +46 ☔ View full report in Codecov by Sentry. |
Closed
tony
force-pushed
the
improved-options
branch
4 times, most recently
from
February 8, 2024 12:35
e5c6186
to
37898a4
Compare
tony
force-pushed
the
improved-options
branch
22 times, most recently
from
February 8, 2024 18:54
97d74c1
to
36c5907
Compare
…parse array" objects and for those to set
…evel, "sparse array" objects and for those to set" This reverts commit 6e9d195.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extracted from #513
Warning
APIs below are subject to change (both params, return types, and structures)
Changes
New internal:
OptionsMixin
show_options()
: High level objects, e.g. preserving sparse-array data such ascommand-alias[1]
,command-alias[99]
, and inside of a dataclass object.command_alias
:TmuxArray({0: {'split-pane': 'split-window'})
_show_options()
: Map of options split up by key, with raw values.command-alias[1] split-pane=split-window
_show_options_raw()
: Raw stdout fromtmux show-options
Individual options:
show_option()
: High level objects, e.g. preserving sparse-array data such ascommand-alias[1]
,command-alias[99]
Not sure if this will scale, but will try to get this:
_show_option()
:_show_option_raw()
: Raw stdout fromtmux show-option [option name]
New internal:
HooksMixin
New features
Window.set_option()
Learned params:
format
->-F
unset
->-u
global
->-g
unset_panes
->-U
: Also unset other panse in windowsprevent_overwrite
:-o
suppress_warnings
:-q
append
:-a
Window.show_option()
Window.show_options()
Breaking changes
Deprecations
Window.set_window_option()
in favor ofWindow.set_option()
Window.show_window_option()
in favor ofWindow.show_option()
Window.show_window_options()
in favor ofWindow.show_options()