tmux 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +60 -0
- data/LICENSE +22 -0
- data/README.md +1076 -0
- data/bin/tmux.rb +6 -0
- data/bin/tmux_rb +4 -0
- data/lib/tmux/cli.rb +224 -0
- data/lib/tmux/command_builder.rb +104 -0
- data/lib/tmux/condition_compiler.rb +127 -0
- data/lib/tmux/config.rb +40 -0
- data/lib/tmux/config_builder.rb +247 -0
- data/lib/tmux/config_compiler.rb +82 -0
- data/lib/tmux/dsl.rb +118 -0
- data/lib/tmux/errors.rb +5 -0
- data/lib/tmux/escape.rb +68 -0
- data/lib/tmux/evaluation.rb +18 -0
- data/lib/tmux/expression.rb +109 -0
- data/lib/tmux/format.rb +94 -0
- data/lib/tmux/format_builder.rb +586 -0
- data/lib/tmux/format_compiler.rb +41 -0
- data/lib/tmux/glyph.rb +45 -0
- data/lib/tmux/option_tree.rb +148 -0
- data/lib/tmux/target.rb +200 -0
- data/lib/tmux/version.rb +5 -0
- data/lib/tmux/zone_builder.rb +31 -0
- data/lib/tmux.rb +47 -0
- metadata +92 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 225f31971e201d9baeeec68e3f920d8a72f727012a15e0617bb09d551a0af4a9
|
|
4
|
+
data.tar.gz: 103f4cbd898b274d9901e825c3eecb95fdd534d2178fe6a59428066e58448f59
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 3006eeaaca5dbf9449c9c2f8081096cc4c172c1f2cb3b1933348409b4a9f231522749213e025f0a187e0ceccbb2eaf63a6905fca3f772d8f58682f6ab5034bbf
|
|
7
|
+
data.tar.gz: 316d61e9d40ae7c52f4352f350d38cb4f78c9b42c5bc047b2cab32d04ab66c4f1a646eeea52de19bee5b6f7111e29db325167381d5203410b5b617ef00228f8f
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (unreleased)
|
|
4
|
+
|
|
5
|
+
First public release, as the `tmux` gem (`require "tmux"`), with the
|
|
6
|
+
`tmux.rb` command (also installed as `tmux_rb`).
|
|
7
|
+
|
|
8
|
+
### Library
|
|
9
|
+
|
|
10
|
+
- `Tmux.configure` and `Tmux.format` DSLs that compile to deterministic
|
|
11
|
+
tmux configuration and format strings. `Tmux.load_file` evaluates a
|
|
12
|
+
configuration file in its own anonymous module.
|
|
13
|
+
- `text` with interpolated expressions kept dynamic and everything else
|
|
14
|
+
literal (escaping `#`, and `%` once per conditional nesting level), plus
|
|
15
|
+
`strftime`, `append`, and `#(...)` `command` content, each with its own
|
|
16
|
+
escaping, verified by rendering in real tmux servers.
|
|
17
|
+
- Expressions: `!`, string `==`/`!=`, numeric `>`, `<`, `>=`,
|
|
18
|
+
`<=`, `matches`, and `substitute`. Booleans and other non-expression values
|
|
19
|
+
raise instead of compiling silently.
|
|
20
|
+
- Automatic `&&` / `||` capture in `if?` / `.elsif?` conditions and inline
|
|
21
|
+
`switch` / `switch_style` keys in files compiled by the CLI or `Tmux.load_file`.
|
|
22
|
+
The private source compiler uses Prism; no public `condition` helper or
|
|
23
|
+
expression `&` / `|` operators are needed.
|
|
24
|
+
- Runtime selection with `Tmux.switch` and `switch_style`, Powerline helpers
|
|
25
|
+
(`left_flag`, `right_segment`, `chip`, ...), and `Tmux.pane_border` zones.
|
|
26
|
+
- Complete target-specific option discovery from the selected tmux executable
|
|
27
|
+
(`--tmux PATH` or `tmux:` in Ruby). Scoped setters validate built-in names,
|
|
28
|
+
scopes, and array indices; inactive version branches are excluded. Custom
|
|
29
|
+
options use scoped brackets such as `global[:@plugin]`. Generic option-setting
|
|
30
|
+
helpers are removed. Loading refuses a mismatched server version.
|
|
31
|
+
- Option names grouped by tmux's own scopes (`global`, `window`,
|
|
32
|
+
`server`), key-binding command blocks and menus, configuration
|
|
33
|
+
`if?`/`.elsif?`/`.else` chains with tmux expressions or deferred `shell(...)`
|
|
34
|
+
exit-status checks (including background checks), compiled to `{ }` command
|
|
35
|
+
blocks, and `tmux_from`/`tmux_below` compiled to `%if` checks
|
|
36
|
+
on the running server's version. Generated configurations need tmux 3.2+;
|
|
37
|
+
CI tests every release from 3.2 to 3.8 and tmux's development branch.
|
|
38
|
+
- Nested blocks keep helper methods and instance variables in scope; a block
|
|
39
|
+
may also take its builder as a parameter.
|
|
40
|
+
|
|
41
|
+
### CLI
|
|
42
|
+
|
|
43
|
+
- `tmux.rb build`, `check`, `diff`, and `load` (with `-S`/`-L` to choose the
|
|
44
|
+
server), plus `--version` and per-command `--help`.
|
|
45
|
+
- `build --output` writes atomically, follows a symlinked destination, and
|
|
46
|
+
keeps an existing file's permissions.
|
|
47
|
+
- Errors raised by a configuration name the file and line that raised them.
|
|
48
|
+
|
|
49
|
+
### Examples
|
|
50
|
+
|
|
51
|
+
- `examples/author_config.rb`, a complete real-world configuration with
|
|
52
|
+
pinned output and tmux-rendered window-tab tests.
|
|
53
|
+
- Ten ports of popular public tmux configurations, checked for equivalence
|
|
54
|
+
against their upstream originals in isolated tmux servers on every tested
|
|
55
|
+
tmux version.
|
|
56
|
+
|
|
57
|
+
### Development
|
|
58
|
+
|
|
59
|
+
- `rake test:tmux` and a CI job build tmux 3.2a through 3.8 and the
|
|
60
|
+
development branch from source and run the suite against each.
|
data/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nick deLannoy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|