multiSSH3 6.27__tar.gz → 6.30__tar.gz

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.
Files changed (60) hide show
  1. {multissh3-6.27 → multissh3-6.30}/PKG-INFO +69 -1
  2. {multissh3-6.27 → multissh3-6.30}/README.md +68 -0
  3. multissh3-6.30/mssh_complete.py +6075 -0
  4. {multissh3-6.27 → multissh3-6.30}/multiSSH3.egg-info/PKG-INFO +69 -1
  5. {multissh3-6.27 → multissh3-6.30}/multiSSH3.egg-info/SOURCES.txt +23 -0
  6. {multissh3-6.27 → multissh3-6.30}/multiSSH3.egg-info/entry_points.txt +1 -0
  7. multissh3-6.30/multiSSH3.egg-info/top_level.txt +2 -0
  8. {multissh3-6.27 → multissh3-6.30}/multiSSH3.py +255 -54
  9. {multissh3-6.27 → multissh3-6.30}/setup.py +2 -1
  10. multissh3-6.30/tests/test_complete_blesh.py +89 -0
  11. multissh3-6.30/tests/test_complete_context.py +157 -0
  12. multissh3-6.30/tests/test_complete_diagnose.py +314 -0
  13. multissh3-6.30/tests/test_complete_editor.py +327 -0
  14. multissh3-6.30/tests/test_complete_engine.py +259 -0
  15. multissh3-6.30/tests/test_complete_eval.py +117 -0
  16. multissh3-6.30/tests/test_complete_hosts.py +23 -0
  17. multissh3-6.30/tests/test_complete_hoststate.py +91 -0
  18. multissh3-6.30/tests/test_complete_index.py +213 -0
  19. multissh3-6.30/tests/test_complete_keys.py +680 -0
  20. multissh3-6.30/tests/test_complete_lex.py +43 -0
  21. multissh3-6.30/tests/test_complete_mssh_helpers.py +122 -0
  22. multissh3-6.30/tests/test_complete_picker.py +287 -0
  23. multissh3-6.30/tests/test_complete_probe.py +182 -0
  24. multissh3-6.30/tests/test_complete_shells.py +295 -0
  25. multissh3-6.30/tests/test_complete_store.py +89 -0
  26. multissh3-6.30/tests/test_complete_suggest.py +129 -0
  27. multissh3-6.30/tests/test_complete_terminal.py +129 -0
  28. multissh3-6.30/tests/test_complete_untrusted.py +77 -0
  29. {multissh3-6.27 → multissh3-6.30}/tests/test_helpers_extra.py +38 -0
  30. multissh3-6.30/tests/test_host_validity.py +92 -0
  31. multissh3-6.30/tests/test_option_no_effect.py +52 -0
  32. multissh3-6.30/tests/test_runtime_dir.py +94 -0
  33. multissh3-6.27/multiSSH3.egg-info/top_level.txt +0 -1
  34. {multissh3-6.27 → multissh3-6.30}/multiSSH3.egg-info/dependency_links.txt +0 -0
  35. {multissh3-6.27 → multissh3-6.30}/setup.cfg +0 -0
  36. {multissh3-6.27 → multissh3-6.30}/tests/test_cli_branches.py +0 -0
  37. {multissh3-6.27 → multissh3-6.30}/tests/test_cli_processing.py +0 -0
  38. {multissh3-6.27 → multissh3-6.30}/tests/test_color_helpers.py +0 -0
  39. {multissh3-6.27 → multissh3-6.30}/tests/test_compact_hostnames.py +0 -0
  40. {multissh3-6.27 → multissh3-6.30}/tests/test_config_cli.py +0 -0
  41. {multissh3-6.27 → multissh3-6.30}/tests/test_config_validate.py +0 -0
  42. {multissh3-6.27 → multissh3-6.30}/tests/test_curses_branches.py +0 -0
  43. {multissh3-6.27 → multissh3-6.30}/tests/test_curses_event_loop.py +0 -0
  44. {multissh3-6.27 → multissh3-6.30}/tests/test_curses_tui.py +0 -0
  45. {multissh3-6.27 → multissh3-6.30}/tests/test_expand_hostnames.py +0 -0
  46. {multissh3-6.27 → multissh3-6.30}/tests/test_file_trust.py +0 -0
  47. {multissh3-6.27 → multissh3-6.30}/tests/test_harness_smoke.py +0 -0
  48. {multissh3-6.27 → multissh3-6.30}/tests/test_host.py +0 -0
  49. {multissh3-6.27 → multissh3-6.30}/tests/test_ipmi_lockout_wait.py +0 -0
  50. {multissh3-6.27 → multissh3-6.30}/tests/test_main_lifecycle.py +0 -0
  51. {multissh3-6.27 → multissh3-6.30}/tests/test_output_merge.py +0 -0
  52. {multissh3-6.27 → multissh3-6.30}/tests/test_run_command.py +0 -0
  53. {multissh3-6.27 → multissh3-6.30}/tests/test_run_command_branches.py +0 -0
  54. {multissh3-6.27 → multissh3-6.30}/tests/test_run_command_characterization.py +0 -0
  55. {multissh3-6.27 → multissh3-6.30}/tests/test_run_on_hosts.py +0 -0
  56. {multissh3-6.27 → multissh3-6.30}/tests/test_run_on_hosts_modes.py +0 -0
  57. {multissh3-6.27 → multissh3-6.30}/tests/test_runtime_branch_matrix.py +0 -0
  58. {multissh3-6.27 → multissh3-6.30}/tests/test_smoke_optional.py +0 -0
  59. {multissh3-6.27 → multissh3-6.30}/tests/test_stream_reader.py +0 -0
  60. {multissh3-6.27 → multissh3-6.30}/tests/test_unavailable_hosts.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: multiSSH3
3
- Version: 6.27
3
+ Version: 6.30
4
4
  Summary: Run commands on multiple hosts via SSH
5
5
  Home-page: https://github.com/yufei-pan/multiSSH3
6
6
  Author: Yufei Pan
@@ -375,6 +375,74 @@ mssh will replace some magic strings in the command string with host specific va
375
375
 
376
376
  > Note: Resolved name is the IP / Hostname with user appended and ip prefix applied. This is what got used to connect to the host.
377
377
 
378
+ ## Autocomplete
379
+
380
+ mssh completes hosts, options, option values and remote commands when you press TAB, in bash, zsh and fish.
381
+
382
+ ```bash
383
+ mssh --completion install # set it up for the shell you run this from
384
+ mssh --completion uninstall # remove it again
385
+ mssh --completion bash # or print the script (bash, zsh or fish)
386
+ ```
387
+
388
+ - **Hosts:** host strings you typed before, env file aliases, `/etc/hosts`, ssh config `Host` entries, `known_hosts` and the ARP table. Large clusters are offered as ranges (`node[0001-2000]`) until what you typed narrows them down. Hosts mssh recently found unreachable come last.
389
+ - **Options and values:** option names, and values you used before (`-u`, `-t`, ...). Paths complete as files. Passwords are never completed.
390
+ - **Commands:** commands from your mssh history, the rest of a command from this machine's own completion (`mssh grp systemctl rest<TAB>`), and the magic strings (`#HOST#`, ...).
391
+
392
+ Ranking uses the rest of the line on both sides of the cursor: after `mssh gpu[01-16] "` the commands you run on those hosts come first, and in the hosts of `mssh ▮ "systemctl restart slurmd"` the hosts you restarted slurmd on come first.
393
+
394
+ Completion never removes what you typed, prints nothing, and falls back to the shell's normal completion when anything is slow or missing.
395
+
396
+ It learns from an index of your history and hosts, kept in mssh's private cache directory (`$XDG_RUNTIME_DIR/multiSSH3` or `/tmp/multiSSH3-<uid>`) and rebuilt in the background when its sources change. `mssh-complete rebuild` rebuilds it now; `mssh-complete eval` replays your history and shows how much typing completion saves.
397
+
398
+ ### Grey suggestions
399
+
400
+ While you type an mssh line, the most likely rest of it shows in grey after the cursor: the rest of the line when one past invocation clearly fits, only the rest of the current word when only that is clear, or the start every known value shares when none is (what TAB would insert), nothing when mssh is not sure. → (or End, Ctrl-F) takes all of it, Alt-→ / Ctrl-→ / Alt-F one word. Enter runs only what you typed.
401
+
402
+ - **zsh:** built in; with [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions) loaded, mssh becomes its first strategy on mssh lines.
403
+ - **bash with [ble.sh](https://github.com/akinomyoga/ble.sh):** built in, as ble.sh's first suggestion source.
404
+ - **plain bash (4.4 or later):** turn on the mssh line editor, which takes over after you type an mssh name and a space, and hands the line back to readline on any key it does not handle (↑, Ctrl-K, ...) or when you delete into `mssh `:
405
+
406
+ ```bash
407
+ mssh --completion install bash editor
408
+ ```
409
+
410
+ Installing again keeps it on; `mssh --completion uninstall bash`, then `mssh --completion install bash`, turns it off.
411
+
412
+ - **fish:** fish's own suggestions already use mssh's completion.
413
+
414
+ ### Ctrl-R
415
+
416
+ Ctrl-R on an mssh line opens a menu below the prompt with the candidates for the word under the cursor (hosts, commands for those hosts, option values), how often and how long ago you used them; Tab switches to whole past invocations. Type to filter, ↑/↓ to move, Enter to insert, Esc to leave the line as it was. On any other line Ctrl-R does what it did before (readline's search, fzf, atuin, ...).
417
+
418
+ ### Warnings before Enter
419
+
420
+ While you type an mssh line, words already typed that mssh would trip over are marked, and one line under the prompt says why. Nothing is ever blocked: Enter runs what you typed.
421
+
422
+ - **Unknown host:** a name mssh would reject (no IP, alias or hosts-file entry, not in DNS, not mapped by your ssh config), with the host you probably meant: `gpu017: unknown host — did you mean gpu17?`
423
+ - **Range surprises:** a range or alias with members mssh would reject: `node[1-16]: 9 of 16 hosts unknown (node1, node2, node3, …) — did you mean node[01-16]?`
424
+ - **Unreachable host:** one that failed in your recent mssh runs (`will be skipped` with `-su`), or that answered ping recently and stopped.
425
+ - **Conflicting options:** two options mssh refuses together, an option given twice, or one that does nothing on this line (`-iu does nothing: only used with --ipmi`).
426
+
427
+ zsh, bash with ble.sh and the plain-bash line editor mark the words and show the reason; fish 4 prints the reason under the line after a space; fish 3 and plain bash without the editor list the warnings at the top of the Ctrl-R menu.
428
+
429
+ Hosts are checked in the background by `mssh-complete probe`: DNS, `ssh -G` (which prints what your ssh config says about the name) and ping. It never connects or logs in to a host itself, so it cannot trip fail2ban. One exception comes from your ssh config: `ssh -G` runs the commands of `Match exec` lines, so a `Match exec` command that contacts the host (such as `nc -z %h 22` to choose a jump host) runs for every host name you type, before Enter. Check `~/.ssh/config` and `/etc/ssh/ssh_config` (and the files they `Include`) if fail2ban matters. The prober runs at low priority, as many checks at once as mssh's own `max_connections` allows. What it learns lives in mssh's runtime directory (`$XDG_RUNTIME_DIR/multiSSH3`, else `/run/user/<uid>/multiSSH3`, `/dev/shm/multiSSH3-<uid>` or the temp dir) and is gone after a reboot. `mssh-complete eval --diagnostics` replays your history and lists the hosts mssh would reject.
430
+
431
+ | Environment variable | Effect |
432
+ | --- | --- |
433
+ | `MSSH_COMPLETE_TIMEOUT` | Seconds the shell waits for an answer (default 0.3) |
434
+ | `MSSH_COMPLETE_GHOST_TIMEOUT` | ble.sh only: milliseconds a grey suggestion may take (default 300) |
435
+ | `MSSH_COMPLETE_SHELL_HISTORY` | Lines of shell history sent along (default 1000) |
436
+ | `MSSH_COMPLETE_EDITOR` | `1` turns on the plain-bash mssh line editor (`install bash editor` sets it) |
437
+ | `MSSH_COMPLETE_PING_TTL` | Seconds a host that answered ping is expected to keep answering (default: mssh's unreachable host expiry, 600) |
438
+ | `MSSH_COMPLETE_DEBUG` | `1` logs errors to `complete.log` in the cache directory |
439
+
440
+ > Tested with bash 4.2 to 5.2, zsh 5.5 to 5.9 (with `compinit` loaded; zsh-autosuggestions 0.7.1), fish 3.3 to 4.0 and the 2026-09-08 ble.sh nightly. Since 6.28 mssh records hosts in its history as typed; older history lines hold them expanded.
441
+
442
+ > After upgrading mssh, run `mssh --completion install` again to get the new shell glue. Glue from an older mssh keeps working, without the newer features.
443
+
444
+ > The plain-bash editor binds the space key, so every space typed in bash runs a tiny shell function; Ctrl-R becomes a key macro (the binding it replaced is called for other lines). Uninstall restores both in new shells.
445
+
378
446
  ## Options
379
447
 
380
448
  Here details the options for multiSSH3 6.02 @ 2025-11-10
@@ -350,6 +350,74 @@ mssh will replace some magic strings in the command string with host specific va
350
350
 
351
351
  > Note: Resolved name is the IP / Hostname with user appended and ip prefix applied. This is what got used to connect to the host.
352
352
 
353
+ ## Autocomplete
354
+
355
+ mssh completes hosts, options, option values and remote commands when you press TAB, in bash, zsh and fish.
356
+
357
+ ```bash
358
+ mssh --completion install # set it up for the shell you run this from
359
+ mssh --completion uninstall # remove it again
360
+ mssh --completion bash # or print the script (bash, zsh or fish)
361
+ ```
362
+
363
+ - **Hosts:** host strings you typed before, env file aliases, `/etc/hosts`, ssh config `Host` entries, `known_hosts` and the ARP table. Large clusters are offered as ranges (`node[0001-2000]`) until what you typed narrows them down. Hosts mssh recently found unreachable come last.
364
+ - **Options and values:** option names, and values you used before (`-u`, `-t`, ...). Paths complete as files. Passwords are never completed.
365
+ - **Commands:** commands from your mssh history, the rest of a command from this machine's own completion (`mssh grp systemctl rest<TAB>`), and the magic strings (`#HOST#`, ...).
366
+
367
+ Ranking uses the rest of the line on both sides of the cursor: after `mssh gpu[01-16] "` the commands you run on those hosts come first, and in the hosts of `mssh ▮ "systemctl restart slurmd"` the hosts you restarted slurmd on come first.
368
+
369
+ Completion never removes what you typed, prints nothing, and falls back to the shell's normal completion when anything is slow or missing.
370
+
371
+ It learns from an index of your history and hosts, kept in mssh's private cache directory (`$XDG_RUNTIME_DIR/multiSSH3` or `/tmp/multiSSH3-<uid>`) and rebuilt in the background when its sources change. `mssh-complete rebuild` rebuilds it now; `mssh-complete eval` replays your history and shows how much typing completion saves.
372
+
373
+ ### Grey suggestions
374
+
375
+ While you type an mssh line, the most likely rest of it shows in grey after the cursor: the rest of the line when one past invocation clearly fits, only the rest of the current word when only that is clear, or the start every known value shares when none is (what TAB would insert), nothing when mssh is not sure. → (or End, Ctrl-F) takes all of it, Alt-→ / Ctrl-→ / Alt-F one word. Enter runs only what you typed.
376
+
377
+ - **zsh:** built in; with [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions) loaded, mssh becomes its first strategy on mssh lines.
378
+ - **bash with [ble.sh](https://github.com/akinomyoga/ble.sh):** built in, as ble.sh's first suggestion source.
379
+ - **plain bash (4.4 or later):** turn on the mssh line editor, which takes over after you type an mssh name and a space, and hands the line back to readline on any key it does not handle (↑, Ctrl-K, ...) or when you delete into `mssh `:
380
+
381
+ ```bash
382
+ mssh --completion install bash editor
383
+ ```
384
+
385
+ Installing again keeps it on; `mssh --completion uninstall bash`, then `mssh --completion install bash`, turns it off.
386
+
387
+ - **fish:** fish's own suggestions already use mssh's completion.
388
+
389
+ ### Ctrl-R
390
+
391
+ Ctrl-R on an mssh line opens a menu below the prompt with the candidates for the word under the cursor (hosts, commands for those hosts, option values), how often and how long ago you used them; Tab switches to whole past invocations. Type to filter, ↑/↓ to move, Enter to insert, Esc to leave the line as it was. On any other line Ctrl-R does what it did before (readline's search, fzf, atuin, ...).
392
+
393
+ ### Warnings before Enter
394
+
395
+ While you type an mssh line, words already typed that mssh would trip over are marked, and one line under the prompt says why. Nothing is ever blocked: Enter runs what you typed.
396
+
397
+ - **Unknown host:** a name mssh would reject (no IP, alias or hosts-file entry, not in DNS, not mapped by your ssh config), with the host you probably meant: `gpu017: unknown host — did you mean gpu17?`
398
+ - **Range surprises:** a range or alias with members mssh would reject: `node[1-16]: 9 of 16 hosts unknown (node1, node2, node3, …) — did you mean node[01-16]?`
399
+ - **Unreachable host:** one that failed in your recent mssh runs (`will be skipped` with `-su`), or that answered ping recently and stopped.
400
+ - **Conflicting options:** two options mssh refuses together, an option given twice, or one that does nothing on this line (`-iu does nothing: only used with --ipmi`).
401
+
402
+ zsh, bash with ble.sh and the plain-bash line editor mark the words and show the reason; fish 4 prints the reason under the line after a space; fish 3 and plain bash without the editor list the warnings at the top of the Ctrl-R menu.
403
+
404
+ Hosts are checked in the background by `mssh-complete probe`: DNS, `ssh -G` (which prints what your ssh config says about the name) and ping. It never connects or logs in to a host itself, so it cannot trip fail2ban. One exception comes from your ssh config: `ssh -G` runs the commands of `Match exec` lines, so a `Match exec` command that contacts the host (such as `nc -z %h 22` to choose a jump host) runs for every host name you type, before Enter. Check `~/.ssh/config` and `/etc/ssh/ssh_config` (and the files they `Include`) if fail2ban matters. The prober runs at low priority, as many checks at once as mssh's own `max_connections` allows. What it learns lives in mssh's runtime directory (`$XDG_RUNTIME_DIR/multiSSH3`, else `/run/user/<uid>/multiSSH3`, `/dev/shm/multiSSH3-<uid>` or the temp dir) and is gone after a reboot. `mssh-complete eval --diagnostics` replays your history and lists the hosts mssh would reject.
405
+
406
+ | Environment variable | Effect |
407
+ | --- | --- |
408
+ | `MSSH_COMPLETE_TIMEOUT` | Seconds the shell waits for an answer (default 0.3) |
409
+ | `MSSH_COMPLETE_GHOST_TIMEOUT` | ble.sh only: milliseconds a grey suggestion may take (default 300) |
410
+ | `MSSH_COMPLETE_SHELL_HISTORY` | Lines of shell history sent along (default 1000) |
411
+ | `MSSH_COMPLETE_EDITOR` | `1` turns on the plain-bash mssh line editor (`install bash editor` sets it) |
412
+ | `MSSH_COMPLETE_PING_TTL` | Seconds a host that answered ping is expected to keep answering (default: mssh's unreachable host expiry, 600) |
413
+ | `MSSH_COMPLETE_DEBUG` | `1` logs errors to `complete.log` in the cache directory |
414
+
415
+ > Tested with bash 4.2 to 5.2, zsh 5.5 to 5.9 (with `compinit` loaded; zsh-autosuggestions 0.7.1), fish 3.3 to 4.0 and the 2026-09-08 ble.sh nightly. Since 6.28 mssh records hosts in its history as typed; older history lines hold them expanded.
416
+
417
+ > After upgrading mssh, run `mssh --completion install` again to get the new shell glue. Glue from an older mssh keeps working, without the newer features.
418
+
419
+ > The plain-bash editor binds the space key, so every space typed in bash runs a tiny shell function; Ctrl-R becomes a key macro (the binding it replaced is called for other lines). Uninstall restores both in new shells.
420
+
353
421
  ## Options
354
422
 
355
423
  Here details the options for multiSSH3 6.02 @ 2025-11-10