|
1 |
| -# tm - tmux manager / helper |
2 |
| - |
3 |
| -This is the second version of my tmux helper _tm_, used to ease my |
4 |
| -day-to-day work with [tmux](https://github.com/tmux/tmux/wiki). |
5 |
| -It is a rewrite in Rust, as I want to learn more Rust. Accidentally that |
6 |
| -made it much faster too, which is nice. |
7 |
| - |
8 |
| -The rewrite is intended to be, as much as possible, a drop-in |
9 |
| -replacement for the old shell version, so any usual _tm s_ or _tm ms_ |
10 |
| -usage should work right away, as well as the usual config files (see |
11 |
| -status for how much is implemented). Still, there might be breakage, |
12 |
| -some known ones are mentioned at the end of this document. Feel free |
13 |
| -to open an issue, if you notice more. |
14 |
| - |
15 |
| -## Silly badges |
16 |
| -[](https://codecov.io/gh/Ganneff/tm) |
17 |
| - |
18 |
| - |
19 |
| -## Usage |
20 |
| -tm still tries to support both commandline styles that the shell |
21 |
| -script did, that is it can both do the "subcommand" style |
22 |
| -(traditional) as well as "getopts" style of old tm. |
23 |
| - |
24 |
| -# Documentation |
25 |
| -A way more detailed documentation is written in "mdbook" style, |
26 |
| -available at [tmbook](https://ganneff.github.io/tmbook/). |
27 |
| - |
28 |
| -# Status |
29 |
| -- [X] Commandline parsing |
30 |
| -- [X] Attach to existing sessions |
31 |
| - - [X] Attach to existing, but "grouped" (separate window config) |
32 |
| -- [X] ls - list sessions |
33 |
| -- [X] s - create new session, open SSH directly to one or more hosts, |
34 |
| - many windows |
35 |
| -- [X] ms - create new session, open SSH directly to one or more |
36 |
| - hosts, one window with many panes, synchronized input. |
37 |
| -- [X] k - kill session |
38 |
| -- [X] -n - Open sessions to same hosts as existing session instead of |
39 |
| - just attaching to that existing session |
40 |
| -- [X] Support same environment variables as shell tm (supports any now) |
41 |
| -- [X] Simple config files (no ending) |
42 |
| - - [X] Allows LIST command, recursively |
43 |
| - - [X] Support ++TMREPLACETM++ |
44 |
| -- [X] Extended config files (.cfg ending) |
45 |
| - |
46 |
| -# Installation |
47 |
| -## How to build |
48 |
| -You need [Rust](https://www.rust-lang.org/) on your machine, |
49 |
| -installation of that is described at [Rust Install](https://www.rust-lang.org/tools/install). |
50 |
| - |
51 |
| -Git clone this repository, afterwards |
52 |
| -[Cargo](https://doc.rust-lang.org/cargo/), the Rust Package manager, |
53 |
| -will help you along, `cargo build --release` should suffice to install |
54 |
| -all needed Rust packages and build a binary. Output file will be |
55 |
| -_target/release/tm_. |
56 |
| - |
57 |
| -## Pre-build binaries |
58 |
| -If you trust Github Actions, you can download a binary built using |
59 |
| -them at [the releases |
60 |
| -page](https://github.com/Ganneff/tm/releases/latest). One is for Apple |
61 |
| -(entirely untested, I do not own such a machine. It compiles, so we |
62 |
| -ship it...), two are for Linux. One of them links against glibc |
63 |
| -(linux-gnu), one uses musl and is fully statically linked. No |
64 |
| -functional difference, the musl one will work even on older Linux |
65 |
| -releases, the glibc one may require a more recent glibc installed. |
66 |
| - |
67 |
| -# (Possibly Breaking) notable changes compared to old shell version |
68 |
| -While the rewrite is intended to be as much as possible compatible to |
69 |
| -the shell variant from earlier, this is not entirely possible. Shell |
70 |
| -*is* a bit different environment after all, and some things that work |
71 |
| -there, for whatever reason, just don't work when using a compiled |
72 |
| -binary now, as they depend on shell internal behaviour. |
73 |
| - |
74 |
| -The following is a (possibly) incomplete list of known behaviour |
75 |
| -changes. |
76 |
| - |
77 |
| -## LIST commands using ssh possibly requiring pseudo-terminal |
78 |
| -Some commands (eg. sudo can be configured for this) may require a |
79 |
| -pseudo-terminal or they refuse work. Add `-tt` to the ssh commandline |
80 |
| -to force allocation of one. |
81 |
| - |
82 |
| -## LIST commands in simple config files |
83 |
| -The LIST commands in simple config files need to be checked for |
84 |
| -correct quoting. Example: |
85 |
| - |
86 |
| -*Broken* |
87 |
| -``` |
88 |
| -LIST ssh -tt TARGETHOST sudo /usr/sbin/gnt-instance list --no-headers -o name --filter '("nsb" in tags and "prod" in tags) and admin_state == "up"' |
89 |
| -``` |
90 |
| -*Fixed* |
91 |
| -``` |
92 |
| -LIST ssh -tt TARGETHOST "sudo /usr/sbin/gnt-instance list --no-headers -o name --filter '(\"nsb\" in tags and \"prod\" in tags) and admin_state == \"up\"'" |
93 |
| -``` |
| 1 | +Migrated to <https://codeberg.org/Ganneff/tm> |
0 commit comments