multiSSH3 6.41__tar.gz → 6.42__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 (112) hide show
  1. {multissh3-6.41/multiSSH3.egg-info → multissh3-6.42}/PKG-INFO +29 -4
  2. {multissh3-6.41 → multissh3-6.42}/README.md +28 -3
  3. {multissh3-6.41 → multissh3-6.42}/mssh_complete.py +116 -40
  4. {multissh3-6.41 → multissh3-6.42/multiSSH3.egg-info}/PKG-INFO +29 -4
  5. {multissh3-6.41 → multissh3-6.42}/multiSSH3.py +2 -2
  6. {multissh3-6.41 → multissh3-6.42}/tests/complete_shell_harness.py +11 -0
  7. {multissh3-6.41 → multissh3-6.42}/tests/shells/Dockerfile.centos7 +3 -2
  8. {multissh3-6.41 → multissh3-6.42}/tests/shells/run_matrix.sh +1 -1
  9. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_blesh.py +4 -2
  10. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_context.py +2 -1
  11. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_engine.py +8 -0
  12. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_keys.py +180 -17
  13. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_shells.py +155 -2
  14. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_zsh_options.py +1 -6
  15. {multissh3-6.41 → multissh3-6.42}/LICENSE +0 -0
  16. {multissh3-6.41 → multissh3-6.42}/MANIFEST.in +0 -0
  17. {multissh3-6.41 → multissh3-6.42}/multiSSH3.egg-info/SOURCES.txt +0 -0
  18. {multissh3-6.41 → multissh3-6.42}/multiSSH3.egg-info/dependency_links.txt +0 -0
  19. {multissh3-6.41 → multissh3-6.42}/multiSSH3.egg-info/entry_points.txt +0 -0
  20. {multissh3-6.41 → multissh3-6.42}/multiSSH3.egg-info/top_level.txt +0 -0
  21. {multissh3-6.41 → multissh3-6.42}/pytest.ini +0 -0
  22. {multissh3-6.41 → multissh3-6.42}/setup.cfg +0 -0
  23. {multissh3-6.41 → multissh3-6.42}/setup.py +0 -0
  24. {multissh3-6.41 → multissh3-6.42}/tests/bench_complete.py +0 -0
  25. {multissh3-6.41 → multissh3-6.42}/tests/conftest.py +0 -0
  26. {multissh3-6.41 → multissh3-6.42}/tests/data/run_command_golden.json +0 -0
  27. {multissh3-6.41 → multissh3-6.42}/tests/replay.py +0 -0
  28. {multissh3-6.41 → multissh3-6.42}/tests/shells/Dockerfile.bash5.1 +0 -0
  29. {multissh3-6.41 → multissh3-6.42}/tests/shells/Dockerfile.bash5.3 +0 -0
  30. {multissh3-6.41 → multissh3-6.42}/tests/shells/Dockerfile.current +0 -0
  31. {multissh3-6.41 → multissh3-6.42}/tests/shells/Dockerfile.el9 +0 -0
  32. {multissh3-6.41 → multissh3-6.42}/tests/shells/Dockerfile.legacy +0 -0
  33. {multissh3-6.41 → multissh3-6.42}/tests/shells/Dockerfile.modern +0 -0
  34. {multissh3-6.41 → multissh3-6.42}/tests/test_cli_branches.py +0 -0
  35. {multissh3-6.41 → multissh3-6.42}/tests/test_cli_option_words.py +0 -0
  36. {multissh3-6.41 → multissh3-6.42}/tests/test_cli_processing.py +0 -0
  37. {multissh3-6.41 → multissh3-6.42}/tests/test_closed_output.py +0 -0
  38. {multissh3-6.41 → multissh3-6.42}/tests/test_color_helpers.py +0 -0
  39. {multissh3-6.41 → multissh3-6.42}/tests/test_command_terminal.py +0 -0
  40. {multissh3-6.41 → multissh3-6.42}/tests/test_compact_hostnames.py +0 -0
  41. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_cli.py +0 -0
  42. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_diagnose.py +0 -0
  43. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_editor.py +0 -0
  44. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_eval.py +0 -0
  45. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_hosts.py +0 -0
  46. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_hoststate.py +0 -0
  47. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_index.py +0 -0
  48. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_lex.py +0 -0
  49. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_mssh_helpers.py +0 -0
  50. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_password_spellings.py +0 -0
  51. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_picker.py +0 -0
  52. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_probe.py +0 -0
  53. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_start.py +0 -0
  54. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_store.py +0 -0
  55. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_suggest.py +0 -0
  56. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_terminal.py +0 -0
  57. {multissh3-6.41 → multissh3-6.42}/tests/test_complete_untrusted.py +0 -0
  58. {multissh3-6.41 → multissh3-6.42}/tests/test_config_cli.py +0 -0
  59. {multissh3-6.41 → multissh3-6.42}/tests/test_config_validate.py +0 -0
  60. {multissh3-6.41 → multissh3-6.42}/tests/test_config_values.py +0 -0
  61. {multissh3-6.41 → multissh3-6.42}/tests/test_control_master_config.py +0 -0
  62. {multissh3-6.41 → multissh3-6.42}/tests/test_copy_id.py +0 -0
  63. {multissh3-6.41 → multissh3-6.42}/tests/test_curses_branches.py +0 -0
  64. {multissh3-6.41 → multissh3-6.42}/tests/test_curses_event_loop.py +0 -0
  65. {multissh3-6.41 → multissh3-6.42}/tests/test_curses_tui.py +0 -0
  66. {multissh3-6.41 → multissh3-6.42}/tests/test_curses_wide_chars.py +0 -0
  67. {multissh3-6.41 → multissh3-6.42}/tests/test_expand_hostnames.py +0 -0
  68. {multissh3-6.41 → multissh3-6.42}/tests/test_file_trust.py +0 -0
  69. {multissh3-6.41 → multissh3-6.42}/tests/test_harness_smoke.py +0 -0
  70. {multissh3-6.41 → multissh3-6.42}/tests/test_helpers_extra.py +0 -0
  71. {multissh3-6.41 → multissh3-6.42}/tests/test_history_replay.py +0 -0
  72. {multissh3-6.41 → multissh3-6.42}/tests/test_host.py +0 -0
  73. {multissh3-6.41 → multissh3-6.42}/tests/test_host_validity.py +0 -0
  74. {multissh3-6.41 → multissh3-6.42}/tests/test_hosts_file.py +0 -0
  75. {multissh3-6.41 → multissh3-6.42}/tests/test_identities_only.py +0 -0
  76. {multissh3-6.41 → multissh3-6.42}/tests/test_ipmi_lockout_wait.py +0 -0
  77. {multissh3-6.41 → multissh3-6.42}/tests/test_ipmi_logins.py +0 -0
  78. {multissh3-6.41 → multissh3-6.42}/tests/test_key_path_home.py +0 -0
  79. {multissh3-6.41 → multissh3-6.42}/tests/test_login_drop_retry.py +0 -0
  80. {multissh3-6.41 → multissh3-6.42}/tests/test_main_lifecycle.py +0 -0
  81. {multissh3-6.41 → multissh3-6.42}/tests/test_narrow_terminal.py +0 -0
  82. {multissh3-6.41 → multissh3-6.42}/tests/test_no_hosts.py +0 -0
  83. {multissh3-6.41 → multissh3-6.42}/tests/test_option_no_effect.py +0 -0
  84. {multissh3-6.41 → multissh3-6.42}/tests/test_options_after_command.py +0 -0
  85. {multissh3-6.41 → multissh3-6.42}/tests/test_output_merge.py +0 -0
  86. {multissh3-6.41 → multissh3-6.42}/tests/test_output_robustness.py +0 -0
  87. {multissh3-6.41 → multissh3-6.42}/tests/test_packaging.py +0 -0
  88. {multissh3-6.41 → multissh3-6.42}/tests/test_password_handling.py +0 -0
  89. {multissh3-6.41 → multissh3-6.42}/tests/test_passwords_out_of_ps.py +0 -0
  90. {multissh3-6.41 → multissh3-6.42}/tests/test_run_command.py +0 -0
  91. {multissh3-6.41 → multissh3-6.42}/tests/test_run_command_branches.py +0 -0
  92. {multissh3-6.41 → multissh3-6.42}/tests/test_run_command_characterization.py +0 -0
  93. {multissh3-6.41 → multissh3-6.42}/tests/test_run_command_exit.py +0 -0
  94. {multissh3-6.41 → multissh3-6.42}/tests/test_run_on_hosts.py +0 -0
  95. {multissh3-6.41 → multissh3-6.42}/tests/test_run_on_hosts_modes.py +0 -0
  96. {multissh3-6.41 → multissh3-6.42}/tests/test_runtime_branch_matrix.py +0 -0
  97. {multissh3-6.41 → multissh3-6.42}/tests/test_runtime_dir.py +0 -0
  98. {multissh3-6.41 → multissh3-6.42}/tests/test_shared_lines.py +0 -0
  99. {multissh3-6.41 → multissh3-6.42}/tests/test_smoke_optional.py +0 -0
  100. {multissh3-6.41 → multissh3-6.42}/tests/test_ssh_error_text.py +0 -0
  101. {multissh3-6.41 → multissh3-6.42}/tests/test_ssh_timeouts.py +0 -0
  102. {multissh3-6.41 → multissh3-6.42}/tests/test_sshpass_exit.py +0 -0
  103. {multissh3-6.41 → multissh3-6.42}/tests/test_start_run_on_hosts.py +0 -0
  104. {multissh3-6.41 → multissh3-6.42}/tests/test_stopped_commands.py +0 -0
  105. {multissh3-6.41 → multissh3-6.42}/tests/test_stream_reader.py +0 -0
  106. {multissh3-6.41 → multissh3-6.42}/tests/test_streamed_output.py +0 -0
  107. {multissh3-6.41 → multissh3-6.42}/tests/test_tui_ssh_notices.py +0 -0
  108. {multissh3-6.41 → multissh3-6.42}/tests/test_unavailable_hosts.py +0 -0
  109. {multissh3-6.41 → multissh3-6.42}/tests/test_underscore_settings.py +0 -0
  110. {multissh3-6.41 → multissh3-6.42}/tests/test_waiting.py +0 -0
  111. {multissh3-6.41 → multissh3-6.42}/tests/test_wide_wrap.py +0 -0
  112. {multissh3-6.41 → multissh3-6.42}/tests/vt_grid.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: multiSSH3
3
- Version: 6.41
3
+ Version: 6.42
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
@@ -576,7 +576,15 @@ Hosts are checked in the background by `mssh-complete probe`: DNS, `ssh -G` (whi
576
576
 
577
577
  > With ble.sh, one of mssh's remote words (from its history) that names a directory on this machine goes in with `/` and no space ([limitations](docs/limitations.md#blesh-a-remote-word-of-msshs-that-names-a-local-directory-gets-a--and-no-space)), and a remote `~/...` path from mssh's history goes in with a bare `~`, which this shell expands to your local home ([limitations](docs/limitations.md#blesh-a-remote--path-from-msshs-history-goes-in-with-a-bare-)); plain bash keeps the space and inserts `\~`.
578
578
 
579
- > With ble.sh, a word that ble.sh splits at an `=` or `:` after a quote, a backslash or an expansion (`"a"=b`, `$V:x`) is read as in 6.39; a `~` after such a split comes back as this machine's home ([limitations](docs/limitations.md#blesh-a-word-split-at-an--or--after-a-quote-backslash-or-expansion-is-read-as-in-639)). On bash 4.3 and 4.4, a remote command's `-o noquote` is not seen, so the local file names completed for it are quoted ([limitations](docs/limitations.md#bash-43-and-44-a-remote-commands--o-noquote-is-not-seen)). With zsh before 5.8, a Ctrl-C during a completion query now and then reaches the query instead of the shell, as in 6.39; a fix is planned for the change after 6.40 ([limitations](docs/limitations.md#zsh-before-58-a-ctrl-c-during-a-completion-query-can-reach-the-query)).
579
+ > With ble.sh, a word that ble.sh splits at an `=` or `:` after a quote, a backslash or an expansion (`"a"=b`, `$V:x`) is read as in 6.39; a `~` after such a split comes back as this machine's home ([limitations](docs/limitations.md#blesh-a-word-split-at-an--or--after-a-quote-backslash-or-expansion-is-read-as-in-639)). On bash 4.3 and 4.4, a remote command's `-o noquote` is not seen, so the local file names completed for it are quoted ([limitations](docs/limitations.md#bash-43-and-44-a-remote-commands--o-noquote-is-not-seen)).
580
+
581
+ > With ble.sh, in a quoted word, ble.sh's second try (matching the typed letters in any order) finds nothing after a directory (`mssh h cat "sub/zzmp<TAB>`) or in a word holding a `$` expansion, a leading `~` or a quote of its own; typing the start of the name still completes ([limitations](docs/limitations.md#blesh-in-a-quoted-word-the-second-try-finds-nothing-after-a-directory-or-an-expansion)).
582
+
583
+ > In zsh and fish, a remote command's name also completes from this shell's internal functions (zsh's `_mssh_complete_take_ctrl_r`, fish's `fish_prompt` and the glue's `__mssh_complete*`), which bash and ble.sh leave out since 6.42; to be fixed after 6.42 ([limitations](docs/limitations.md#zsh-and-fish-offer-this-shells-own-functions-as-remote-command-names)).
584
+
585
+ > With zsh before 5.8 and zsh-autosuggestions in its default asynchronous mode, a Ctrl-C while typing an mssh line now and then keeps the line, as the plugin's own processes hold the terminal for a moment; press Ctrl-C again ([limitations](docs/limitations.md#zsh-before-58-with-zsh-autosuggestions-async-mode-a-ctrl-c-now-and-then-keeps-the-line)).
586
+
587
+ > On zsh before 5.3, mssh draws no grey text of its own and shows no warnings, as the zle hooks they need (`add-zle-hook-widget`) came in zsh 5.3; with zsh-autosuggestions loaded, its grey text still comes from mssh. TAB completion works.
580
588
 
581
589
  ## Options
582
590
 
@@ -984,7 +992,7 @@ Option names count in full only: `--user` is not `--username` and `-c` is not `-
984
992
 
985
993
  Putting the command after `--` is no substitute for quotes: every word after the hosts is a command of its own, so `mssh web1 -- bash -c 'echo hi'` runs `bash`, `-c` and `echo hi` one after another (when each word is a single word, as in `mssh web1 -- ls -la`, mssh asks whether to join them).
986
994
 
987
- Below is a sample help message output from multiSSH3 6.41 @ 2026-11-03 (no config file, 120 columns; the lines after the options list the programs found on that machine)
995
+ Below is a sample help message output from multiSSH3 6.42 @ 2026-11-04 (no config file, 120 columns; the lines after the options list the programs found on that machine)
988
996
 
989
997
  ```bash
990
998
  $ mssh -h
@@ -1398,6 +1406,24 @@ __DEBUG_MODE = False
1398
1406
 
1399
1407
  > `__DEBUG_MODE` is used to control whether to print host thread execution debug information to its stderr.
1400
1408
 
1409
+ ## Upgrading to 6.42 from 6.41
1410
+
1411
+ With zsh before 5.8 (zsh 5.5 is EL8's), run `mssh --completion install` again: the Ctrl-C fix below is in the new glue. Do the same in bash, with or without ble.sh, for the Ctrl-R, ble.sh and function-name fixes (fish's glue did not change; the quoted-argument fix needs no install). What you may notice:
1412
+
1413
+ - Fix (bash): a Ctrl-R pick or a Ctrl-X Ctrl-E edit was now and then dropped without a word, leaving the line as it was (about 1 in 50 to 100 on bash 5.2 in tests, less on other versions): the glue waits for the picker's "ready" in reads of 0.1 s, and when it arrived as one ran out, bash 5 kept its first byte where the next read wrote over it, and bash 4.2 to 4.4 dropped it. Both now count.
1414
+ - Fix (bash 4.2 and 4.3, e.g. CentOS 7's): the shell could end with "Alarm clock" on Ctrl-R or Ctrl-X Ctrl-E, about once in 1000, when the picker's answer came as a 0.1 s wait ran out (a bash bug fixed in 4.4). The glue now ignores SIGALRM during that wait and puts your own trap for it back after.
1415
+ - Fix (zsh 5.0.2, CentOS 7's): the first TAB in a remote command reset your own `setopt` options for the rest of the session (`emulate -L zsh -o ...` forgets `-L` there), so `glob_dots` and the like stopped working. They now stay. mssh's own grey text and warnings still need zsh 5.3; TAB completion works on 5.0.2.
1416
+
1417
+ - Fix (zsh before 5.8): a Ctrl-C during a completion query (a TAB, the grey text, the warnings) reaches the shell and drops the line. 6.41 and earlier now and then left the terminal with the query, so the Ctrl-C went to the query and the line stayed. The queries no longer take the terminal from the shell; zsh 5.8 and later were not affected. zsh-autosuggestions' own asynchronous fetch still takes it now and then (below).
1418
+ - Fix (ble.sh): when a word in a quote gets nothing, ble.sh's second try, which matches the typed letters in any order, now completes it by the quote's rules: `mssh h cat "zzmp<TAB>` with a file `zzamp&b` gives `cat "zzamp\\&b"`, `mssh h "cat zzmp<TAB>` gives `"cat zzamp\\&b"`, and `mssh -f "zzmp<TAB>` gives `-f "zzamp&b"`. 6.41 offered nothing there. A name holding whitespace stays out of a quoted argument, as on the first try.
1419
+ - Fix (bash, ble.sh): this shell's internal functions are no longer offered as remote command names: names starting with `_` (bash-completion's `_comp_*` and `_filedir`, the glue's own), bash-completion's `quote`, `dequote` and `quote_readline`, and ble.sh's `ble`, `ble-*`, `ble/*`, `bleopt` and `blehook`, unless a file here or a command on PATH has the name. Under ble.sh `mssh h bed<TAB>` could put in a ble.sh function, and `mssh h sudo "amb<TAB>` bash-completion's `_comp__reassemble_words`, which every host would then try to run. Your other functions and aliases (`module`, `ml`, `nvm`) are still offered, as in 6.41.
1420
+ - Fix (bash, ble.sh, zsh, fish): in a quoted argument after another quoted one, `mssh h grep 'a' "zz<TAB>` could put in a local name holding a space (`"zz\\ a"`), which mssh would run as a command of its own. mssh joins an argument without whitespace with the command's other words, quoted or not, so such names are now left out there too. After an argument holding whitespace (`'a b'`, `zz\ a`, `''`), which mssh runs as a command of its own, the word being typed completes as a new command name.
1421
+ - Known limits ([limitations](docs/limitations.md#found-in-642s-review)):
1422
+ - zsh and fish still offer this shell's internal functions as remote command names (zsh's `_mssh_complete_take_ctrl_r`, fish's `fish_prompt`); to be fixed after 6.42 ([limitations](docs/limitations.md#zsh-and-fish-offer-this-shells-own-functions-as-remote-command-names)).
1423
+ - ble.sh: in a quoted word, the second try finds nothing after a directory (`mssh h cat "sub/zzmp<TAB>`) or in a word holding a `$` expansion, a leading `~` or a quote of its own; type the start of the name ([limitations](docs/limitations.md#blesh-in-a-quoted-word-the-second-try-finds-nothing-after-a-directory-or-an-expansion)).
1424
+ - zsh before 5.8 with zsh-autosuggestions in its asynchronous mode (its default): a Ctrl-C while typing an mssh line now and then still keeps the line, as the plugin's own processes hold the terminal for a moment; press Ctrl-C again ([limitations](docs/limitations.md#zsh-before-58-with-zsh-autosuggestions-async-mode-a-ctrl-c-now-and-then-keeps-the-line)).
1425
+ - bash: in a window of microseconds at the end of the picker's start, the picker or the editor can still come up with nothing reading its answer; your choice is then not applied, so press Enter or Esc and try again ([limitations](docs/limitations.md#bash-the-picker-or-the-editor-can-come-up-with-nothing-reading-its-answer)).
1426
+
1401
1427
  ## Upgrading to 6.41 from 6.40
1402
1428
 
1403
1429
  Run `mssh --completion install` again (bash, ble.sh, zsh and fish) to get the new glue. What you may notice:
@@ -1421,7 +1447,6 @@ Run `mssh --completion install` again (bash, ble.sh, zsh and fish) to get the ne
1421
1447
  - readline and ble.sh: `mssh h ls ${VAR:-x}/zz<TAB>` writes a broken word (`${VAR:-x\\\}/...`), as 6.40 did ([limitations](docs/limitations.md#bash-a-default-value-expansion-in-a-remote-word-is-written-broken)).
1422
1448
  - In a quoted command, a word holding a `;`, `|` or `(` quoted for the remote shell (`mssh h "ls zz\\;<TAB>`) gets nothing more ([limitations](docs/limitations.md#a-name-holding---or--in-a-quoted-command-cannot-be-continued)).
1423
1449
  - Whitespace in names is read as UTF-8: in a Latin-1 or GBK locale (untested) a name may be offered or left out wrongly ([limitations](docs/limitations.md#whitespace-in-names-is-read-as-utf-8)).
1424
- - ble.sh: in a quoted word, letters typed out of order find nothing; only names that begin with what was typed are offered ([limitations](docs/limitations.md#blesh-letters-typed-out-of-order-in-a-quoted-word-find-nothing)).
1425
1450
  - bash: a directory completed in a quoted command closes the quote (`mssh h "ls zzd<TAB>` gives `"ls zzdir" `), as in 6.40, and so does one in a quoted argument whose name changes for the remote shell (`ls "zzd\\&x" `); to be fixed after 6.41 ([limitations](docs/limitations.md#a-directory-completed-in-a-quoted-command-or-argument-closes-the-quote)).
1426
1451
  - When PATH finds an mssh-complete older than the glue (a system install beside a newer venv, `sudo -i`), quoted arguments complete as in 6.40; install the same version ([limitations](docs/limitations.md#with-an-engine-older-than-the-glue-quoted-arguments-behave-as-in-640)).
1427
1452
  - zsh: `mssh h "ls $PWD/zzd<TAB>` rewrites the line to `ls\ /the/directory/zzd` and completes nothing, as in 6.40; to be fixed after 6.41 ([limitations](docs/limitations.md#zsh-a-variable-in-a-double-quoted-command-is-expanded-and-nothing-completes)).
@@ -550,7 +550,15 @@ Hosts are checked in the background by `mssh-complete probe`: DNS, `ssh -G` (whi
550
550
 
551
551
  > With ble.sh, one of mssh's remote words (from its history) that names a directory on this machine goes in with `/` and no space ([limitations](docs/limitations.md#blesh-a-remote-word-of-msshs-that-names-a-local-directory-gets-a--and-no-space)), and a remote `~/...` path from mssh's history goes in with a bare `~`, which this shell expands to your local home ([limitations](docs/limitations.md#blesh-a-remote--path-from-msshs-history-goes-in-with-a-bare-)); plain bash keeps the space and inserts `\~`.
552
552
 
553
- > With ble.sh, a word that ble.sh splits at an `=` or `:` after a quote, a backslash or an expansion (`"a"=b`, `$V:x`) is read as in 6.39; a `~` after such a split comes back as this machine's home ([limitations](docs/limitations.md#blesh-a-word-split-at-an--or--after-a-quote-backslash-or-expansion-is-read-as-in-639)). On bash 4.3 and 4.4, a remote command's `-o noquote` is not seen, so the local file names completed for it are quoted ([limitations](docs/limitations.md#bash-43-and-44-a-remote-commands--o-noquote-is-not-seen)). With zsh before 5.8, a Ctrl-C during a completion query now and then reaches the query instead of the shell, as in 6.39; a fix is planned for the change after 6.40 ([limitations](docs/limitations.md#zsh-before-58-a-ctrl-c-during-a-completion-query-can-reach-the-query)).
553
+ > With ble.sh, a word that ble.sh splits at an `=` or `:` after a quote, a backslash or an expansion (`"a"=b`, `$V:x`) is read as in 6.39; a `~` after such a split comes back as this machine's home ([limitations](docs/limitations.md#blesh-a-word-split-at-an--or--after-a-quote-backslash-or-expansion-is-read-as-in-639)). On bash 4.3 and 4.4, a remote command's `-o noquote` is not seen, so the local file names completed for it are quoted ([limitations](docs/limitations.md#bash-43-and-44-a-remote-commands--o-noquote-is-not-seen)).
554
+
555
+ > With ble.sh, in a quoted word, ble.sh's second try (matching the typed letters in any order) finds nothing after a directory (`mssh h cat "sub/zzmp<TAB>`) or in a word holding a `$` expansion, a leading `~` or a quote of its own; typing the start of the name still completes ([limitations](docs/limitations.md#blesh-in-a-quoted-word-the-second-try-finds-nothing-after-a-directory-or-an-expansion)).
556
+
557
+ > In zsh and fish, a remote command's name also completes from this shell's internal functions (zsh's `_mssh_complete_take_ctrl_r`, fish's `fish_prompt` and the glue's `__mssh_complete*`), which bash and ble.sh leave out since 6.42; to be fixed after 6.42 ([limitations](docs/limitations.md#zsh-and-fish-offer-this-shells-own-functions-as-remote-command-names)).
558
+
559
+ > With zsh before 5.8 and zsh-autosuggestions in its default asynchronous mode, a Ctrl-C while typing an mssh line now and then keeps the line, as the plugin's own processes hold the terminal for a moment; press Ctrl-C again ([limitations](docs/limitations.md#zsh-before-58-with-zsh-autosuggestions-async-mode-a-ctrl-c-now-and-then-keeps-the-line)).
560
+
561
+ > On zsh before 5.3, mssh draws no grey text of its own and shows no warnings, as the zle hooks they need (`add-zle-hook-widget`) came in zsh 5.3; with zsh-autosuggestions loaded, its grey text still comes from mssh. TAB completion works.
554
562
 
555
563
  ## Options
556
564
 
@@ -958,7 +966,7 @@ Option names count in full only: `--user` is not `--username` and `-c` is not `-
958
966
 
959
967
  Putting the command after `--` is no substitute for quotes: every word after the hosts is a command of its own, so `mssh web1 -- bash -c 'echo hi'` runs `bash`, `-c` and `echo hi` one after another (when each word is a single word, as in `mssh web1 -- ls -la`, mssh asks whether to join them).
960
968
 
961
- Below is a sample help message output from multiSSH3 6.41 @ 2026-11-03 (no config file, 120 columns; the lines after the options list the programs found on that machine)
969
+ Below is a sample help message output from multiSSH3 6.42 @ 2026-11-04 (no config file, 120 columns; the lines after the options list the programs found on that machine)
962
970
 
963
971
  ```bash
964
972
  $ mssh -h
@@ -1372,6 +1380,24 @@ __DEBUG_MODE = False
1372
1380
 
1373
1381
  > `__DEBUG_MODE` is used to control whether to print host thread execution debug information to its stderr.
1374
1382
 
1383
+ ## Upgrading to 6.42 from 6.41
1384
+
1385
+ With zsh before 5.8 (zsh 5.5 is EL8's), run `mssh --completion install` again: the Ctrl-C fix below is in the new glue. Do the same in bash, with or without ble.sh, for the Ctrl-R, ble.sh and function-name fixes (fish's glue did not change; the quoted-argument fix needs no install). What you may notice:
1386
+
1387
+ - Fix (bash): a Ctrl-R pick or a Ctrl-X Ctrl-E edit was now and then dropped without a word, leaving the line as it was (about 1 in 50 to 100 on bash 5.2 in tests, less on other versions): the glue waits for the picker's "ready" in reads of 0.1 s, and when it arrived as one ran out, bash 5 kept its first byte where the next read wrote over it, and bash 4.2 to 4.4 dropped it. Both now count.
1388
+ - Fix (bash 4.2 and 4.3, e.g. CentOS 7's): the shell could end with "Alarm clock" on Ctrl-R or Ctrl-X Ctrl-E, about once in 1000, when the picker's answer came as a 0.1 s wait ran out (a bash bug fixed in 4.4). The glue now ignores SIGALRM during that wait and puts your own trap for it back after.
1389
+ - Fix (zsh 5.0.2, CentOS 7's): the first TAB in a remote command reset your own `setopt` options for the rest of the session (`emulate -L zsh -o ...` forgets `-L` there), so `glob_dots` and the like stopped working. They now stay. mssh's own grey text and warnings still need zsh 5.3; TAB completion works on 5.0.2.
1390
+
1391
+ - Fix (zsh before 5.8): a Ctrl-C during a completion query (a TAB, the grey text, the warnings) reaches the shell and drops the line. 6.41 and earlier now and then left the terminal with the query, so the Ctrl-C went to the query and the line stayed. The queries no longer take the terminal from the shell; zsh 5.8 and later were not affected. zsh-autosuggestions' own asynchronous fetch still takes it now and then (below).
1392
+ - Fix (ble.sh): when a word in a quote gets nothing, ble.sh's second try, which matches the typed letters in any order, now completes it by the quote's rules: `mssh h cat "zzmp<TAB>` with a file `zzamp&b` gives `cat "zzamp\\&b"`, `mssh h "cat zzmp<TAB>` gives `"cat zzamp\\&b"`, and `mssh -f "zzmp<TAB>` gives `-f "zzamp&b"`. 6.41 offered nothing there. A name holding whitespace stays out of a quoted argument, as on the first try.
1393
+ - Fix (bash, ble.sh): this shell's internal functions are no longer offered as remote command names: names starting with `_` (bash-completion's `_comp_*` and `_filedir`, the glue's own), bash-completion's `quote`, `dequote` and `quote_readline`, and ble.sh's `ble`, `ble-*`, `ble/*`, `bleopt` and `blehook`, unless a file here or a command on PATH has the name. Under ble.sh `mssh h bed<TAB>` could put in a ble.sh function, and `mssh h sudo "amb<TAB>` bash-completion's `_comp__reassemble_words`, which every host would then try to run. Your other functions and aliases (`module`, `ml`, `nvm`) are still offered, as in 6.41.
1394
+ - Fix (bash, ble.sh, zsh, fish): in a quoted argument after another quoted one, `mssh h grep 'a' "zz<TAB>` could put in a local name holding a space (`"zz\\ a"`), which mssh would run as a command of its own. mssh joins an argument without whitespace with the command's other words, quoted or not, so such names are now left out there too. After an argument holding whitespace (`'a b'`, `zz\ a`, `''`), which mssh runs as a command of its own, the word being typed completes as a new command name.
1395
+ - Known limits ([limitations](docs/limitations.md#found-in-642s-review)):
1396
+ - zsh and fish still offer this shell's internal functions as remote command names (zsh's `_mssh_complete_take_ctrl_r`, fish's `fish_prompt`); to be fixed after 6.42 ([limitations](docs/limitations.md#zsh-and-fish-offer-this-shells-own-functions-as-remote-command-names)).
1397
+ - ble.sh: in a quoted word, the second try finds nothing after a directory (`mssh h cat "sub/zzmp<TAB>`) or in a word holding a `$` expansion, a leading `~` or a quote of its own; type the start of the name ([limitations](docs/limitations.md#blesh-in-a-quoted-word-the-second-try-finds-nothing-after-a-directory-or-an-expansion)).
1398
+ - zsh before 5.8 with zsh-autosuggestions in its asynchronous mode (its default): a Ctrl-C while typing an mssh line now and then still keeps the line, as the plugin's own processes hold the terminal for a moment; press Ctrl-C again ([limitations](docs/limitations.md#zsh-before-58-with-zsh-autosuggestions-async-mode-a-ctrl-c-now-and-then-keeps-the-line)).
1399
+ - bash: in a window of microseconds at the end of the picker's start, the picker or the editor can still come up with nothing reading its answer; your choice is then not applied, so press Enter or Esc and try again ([limitations](docs/limitations.md#bash-the-picker-or-the-editor-can-come-up-with-nothing-reading-its-answer)).
1400
+
1375
1401
  ## Upgrading to 6.41 from 6.40
1376
1402
 
1377
1403
  Run `mssh --completion install` again (bash, ble.sh, zsh and fish) to get the new glue. What you may notice:
@@ -1395,7 +1421,6 @@ Run `mssh --completion install` again (bash, ble.sh, zsh and fish) to get the ne
1395
1421
  - readline and ble.sh: `mssh h ls ${VAR:-x}/zz<TAB>` writes a broken word (`${VAR:-x\\\}/...`), as 6.40 did ([limitations](docs/limitations.md#bash-a-default-value-expansion-in-a-remote-word-is-written-broken)).
1396
1422
  - In a quoted command, a word holding a `;`, `|` or `(` quoted for the remote shell (`mssh h "ls zz\\;<TAB>`) gets nothing more ([limitations](docs/limitations.md#a-name-holding---or--in-a-quoted-command-cannot-be-continued)).
1397
1423
  - Whitespace in names is read as UTF-8: in a Latin-1 or GBK locale (untested) a name may be offered or left out wrongly ([limitations](docs/limitations.md#whitespace-in-names-is-read-as-utf-8)).
1398
- - ble.sh: in a quoted word, letters typed out of order find nothing; only names that begin with what was typed are offered ([limitations](docs/limitations.md#blesh-letters-typed-out-of-order-in-a-quoted-word-find-nothing)).
1399
1424
  - bash: a directory completed in a quoted command closes the quote (`mssh h "ls zzd<TAB>` gives `"ls zzdir" `), as in 6.40, and so does one in a quoted argument whose name changes for the remote shell (`ls "zzd\\&x" `); to be fixed after 6.41 ([limitations](docs/limitations.md#a-directory-completed-in-a-quoted-command-or-argument-closes-the-quote)).
1400
1425
  - When PATH finds an mssh-complete older than the glue (a system install beside a newer venv, `sudo -i`), quoted arguments complete as in 6.40; install the same version ([limitations](docs/limitations.md#with-an-engine-older-than-the-glue-quoted-arguments-behave-as-in-640)).
1401
1426
  - zsh: `mssh h "ls $PWD/zzd<TAB>` rewrites the line to `ls\ /the/directory/zzd` and completes nothing, as in 6.40; to be fixed after 6.41 ([limitations](docs/limitations.md#zsh-a-variable-in-a-double-quoted-command-is-expanded-and-nothing-completes)).
@@ -21,7 +21,7 @@ try:
21
21
  except ImportError: # not POSIX: the shells are, so nothing starts the detached processes there
22
22
  fcntl = None
23
23
 
24
- version = '0.14'
24
+ version = '0.15'
25
25
  __version__ = version
26
26
  PROTOCOL = 'MSSHC1'
27
27
  MSSH_NAMES = ('mssh', 'mssh3', 'multissh', 'multissh3', 'multiSSH3')
@@ -785,10 +785,12 @@ def parse_context(before, after, spec):
785
785
  skip = {current}
786
786
  command_words = command_word_index = command_prefix = whole = None
787
787
  if slot == SLOT_COMMAND:
788
- # the unquoted command words the current word continues; argparse drops a "--" between them
788
+ # the command words without whitespace the current word continues; argparse drops a "--" between them
789
789
  def joins(index):
790
790
  role = roles[index][0]
791
- return role == ROLE_SEPARATOR or (role == ROLE_COMMAND and not words[index].quoted)
791
+ # (mssh joins every command word without whitespace, quoted or not: grep 'a' "zz is one command, and zz a would be
792
+ # two words of it)
793
+ return role == ROLE_SEPARATOR or (role == ROLE_COMMAND and _joinable(words[index].text))
792
794
  first = current
793
795
  while first > 0 and joins(first - 1):
794
796
  first -= 1
@@ -5804,6 +5806,20 @@ _mssh_complete_delegate() {
5804
5806
  _mssh_complete_dropped=1
5805
5807
  continue
5806
5808
  fi
5809
+ # a function of ble.sh's, bash-completion's or the glue's own is no command on the remote host: such a name is left out,
5810
+ # unless a file here or a command on PATH has it (compgen -c lists them: mssh h bed got bled, sudo amb ble/amb, and under
5811
+ # ble.sh's second try sudo "amb _comp__reassemble_words). By name, not every function of this shell: module, ml and nvm
5812
+ # are shell functions here and on the remote host too. A leading underscore marks a completion's or a helper's internal
5813
+ # function by convention (_comp_*, _filedir, _ble_*, _mssh_complete*); bash-completion's helpers without one are quote,
5814
+ # dequote and quote_readline (the second try found dequote for sudo "dqt); ble.sh's own are ble, ble-*, ble/*, bleopt*,
5815
+ # blehook* (the wrappers it makes of builtins, bind, read, history, stay: they are the remote shell's builtins)
5816
+ case $_mssh_complete_item in
5817
+ _*|quote|dequote|quote_readline|ble|ble-*|ble/*|bleopt|bleopt/*|blehook|blehook/*)
5818
+ if declare -F -- "$_mssh_complete_item" >/dev/null 2>&1; then
5819
+ [[ -e $_mssh_complete_item ]] || type -P -- "$_mssh_complete_item" >/dev/null 2>&1 || continue
5820
+ fi
5821
+ ;;
5822
+ esac
5807
5823
  _mssh_complete_item=$_mssh_complete_prefix$_mssh_complete_item
5808
5824
  if [[ -n $_mssh_complete_lead && $_mssh_complete_item == "$_mssh_complete_lead"* ]]; then
5809
5825
  _mssh_complete_item=${_mssh_complete_item:${#_mssh_complete_lead}}
@@ -6219,7 +6235,7 @@ _mssh_complete_tab() {
6219
6235
  local _mssh_complete_subword=$2 _mssh_complete_typed_line=0 _mssh_complete_plain=$2 _mssh_complete_value
6220
6236
  local _mssh_complete_marking= _mssh_complete_marked=0 _mssh_complete_quote= _mssh_complete_head_name= _mssh_complete_head_text=
6221
6237
  local _mssh_complete_unsplit=0 _mssh_complete_head_path= _mssh_complete_head_read=0 _mssh_complete_qcommand=0 _mssh_complete_inquote=0
6222
- local _mssh_complete_raw _mssh_complete_lead _mssh_complete_dot=
6238
+ local _mssh_complete_raw _mssh_complete_lead _mssh_complete_dot= _mssh_complete_again= _mssh_complete_asked_again=0 _mssh_complete_request
6223
6239
  local -a _mssh_complete_reply=() _mssh_complete_xfields=() _mssh_complete_fields=() _mssh_complete_delegated=() _mssh_complete_words=()
6224
6240
  local -A _mssh_complete_seen=()
6225
6241
  if (( BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] < 3 )); then
@@ -6253,15 +6269,25 @@ _mssh_complete_tab() {
6253
6269
  # offers every file, one of which a second TAB puts in place of the word)
6254
6270
  _mssh_complete_plain=${COMPV:${#progcomp_prefix}}
6255
6271
  fi
6256
- # ble.sh asks again for an empty word when the word typed got nothing, to match names in any order, and puts the ones it
6257
- # matches in outside the quote the word opened (mssh h -- "zz got "ble/"zz, the start of local functions): in a quote,
6258
- # nothing for it, ble.sh's own names neither
6272
+ # ble.sh asks again when the word typed got nothing, to match names in any order: for the word's start, an empty word
6273
+ # or its first character (comp_words[comp_cword]), on a line that ends with that word, outside the quote the typed word
6274
+ # opened (COMPS), and inserts the names it matches in that quote. For a word in a quote the engine gets the line as
6275
+ # typed, the first ask's, and the delegate the remote word cut as ble.sh cut it (_mssh_complete_again, below): so the
6276
+ # names are written by the rules of the quote (mssh h cat "zz got "zz\\ a" from the line without it, which mssh ran
6277
+ # as two commands). ble.sh's own names neither (-- "zz got "ble/"zz, the start of local functions)
6259
6278
  if [[ $_mssh_complete_before != *"$COMPS" ]] && [[ $_mssh_complete_subword == [\"\']* || $_mssh_complete_subword == \$\'* ]]; then
6260
6279
  compopt +o default +o bashdefault 2>/dev/null || :
6261
6280
  compopt -o ble/no-default 2>/dev/null || :
6262
- return 0
6281
+ _mssh_complete_again=${comp_words[comp_cword]-}
6282
+ [[ -n ${comp_cword-} && $_mssh_complete_before == *"$_mssh_complete_again" ]] || return 0
6283
+ _mssh_complete_request=${_mssh_complete_before%"$_mssh_complete_again"}$COMPS
6284
+ _mssh_complete_asked_again=1
6285
+ # (mssh's own option value, D files, cut the same)
6286
+ [[ -n $_mssh_complete_again ]] || _mssh_complete_plain=
6287
+ _mssh_complete_plain=${_mssh_complete_plain:0:1}
6263
6288
  fi
6264
6289
  fi
6290
+ (( _mssh_complete_asked_again )) || _mssh_complete_request=$_mssh_complete_before
6265
6291
  _mssh_complete_read_locale
6266
6292
  _mssh_complete_flags="nosort=0 ble=$_mssh_complete_ble term=${TERM-} $_mssh_complete_locale"
6267
6293
  if (( BASH_VERSINFO[0] > 4 || (BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] >= 4) )); then
@@ -6274,7 +6300,7 @@ _mssh_complete_tab() {
6274
6300
  {
6275
6301
  local _mssh_complete_ignoring=0
6276
6302
  [[ $(bind -v 2>/dev/null) == *'completion-ignore-case on'* ]] && _mssh_complete_ignoring=1
6277
- printf '%s\0' MSSHC1 bash "$BASH_VERSION" "$_mssh_complete_flags icase=$_mssh_complete_ignoring" "$_mssh_complete_before" "$_mssh_complete_after" "$_mssh_complete_subword"
6303
+ printf '%s\0' MSSHC1 bash "$BASH_VERSION" "$_mssh_complete_flags icase=$_mssh_complete_ignoring" "$_mssh_complete_request" "$_mssh_complete_after" "$_mssh_complete_subword"
6278
6304
  fc -ln -"${MSSH_COMPLETE_SHELL_HISTORY:-1000}" 2>/dev/null
6279
6305
  } | _mssh_complete_engine query 2>/dev/null || :
6280
6306
  ) || return 0
@@ -6324,6 +6350,19 @@ _mssh_complete_tab() {
6324
6350
  fi
6325
6351
  (( _mssh_complete_qcommand )) && _mssh_complete_inquote=1
6326
6352
  if (( _mssh_complete_delegating )) && (( ${#_mssh_complete_xfields[@]} >= 3 )); then
6353
+ # ble.sh's second try (above): the remote word cut as ble.sh cut the typed word, to nothing or its first character (a
6354
+ # backslash with the one it quotes), and a first word of the remote command to that character always (an empty one would
6355
+ # bring every command here). Nothing for a remote word holding a quote of its own,
6356
+ # an expansion, a leading ~ or a directory, which the cut would drop: ble.sh matches the names against its value of the
6357
+ # typed word, in which an unset "rm $ZZNONE is "rm , and every name matched (rm ${ZZNONE}zzo went in)
6358
+ if (( _mssh_complete_asked_again )); then
6359
+ _mssh_complete_one=${_mssh_complete_xfields[_mssh_complete_xfields[0]+2]-}
6360
+ [[ ${_mssh_complete_one//\\?/} == *[\"\'\$\`/]* || $_mssh_complete_one == '~'* ]] && return 0
6361
+ _mssh_complete_item=1
6362
+ [[ $_mssh_complete_one == '\'?* ]] && _mssh_complete_item=2
6363
+ [[ -z $_mssh_complete_again ]] && (( _mssh_complete_xfields[0] > 0 )) && _mssh_complete_item=0
6364
+ _mssh_complete_xfields[_mssh_complete_xfields[0]+2]=${_mssh_complete_one:0:_mssh_complete_item}
6365
+ fi
6327
6366
  # the word the delegate completes, as bash would hand it, in the remote command's text: the remote word after
6328
6367
  # progcomp_prefix under ble.sh; under readline its word without this shell's backslashes, or in a quoted command (its
6329
6368
  # word is the text as typed, in which the remote shell's text may be quoted again: zzamp\\&b in "..." for zzamp\&b) the
@@ -6556,13 +6595,32 @@ _mssh_complete_apply() {
6556
6595
  _mssh_complete_set "$_mssh_complete_text" "$_mssh_complete_cursor"
6557
6596
  }
6558
6597
 
6598
+ _mssh_complete_alrm_off() {
6599
+ # for a timed read: bash 4.2 and 4.3 restore SIGALRM's handler before they cancel the read's timer, so the timer going
6600
+ # off between the two (the byte came as it ran out) ended the shell with "Alarm clock"; ignored, it ends nothing (the
6601
+ # read sets its own handler). Not in later bash, which has no such window: there readline's and bash's own handler
6602
+ # for it (TMOUT) would be replaced by what trap puts back. The caller's _mssh_complete_alrm holds the operator's trap,
6603
+ # or - when none is ignored
6604
+ _mssh_complete_alrm=-
6605
+ if (( BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] < 4 )); then
6606
+ _mssh_complete_alrm=$(trap -p ALRM)
6607
+ trap '' ALRM
6608
+ fi
6609
+ }
6610
+
6611
+ _mssh_complete_alrm_on() {
6612
+ # the operator's trap for SIGALRM back (_mssh_complete_alrm_off)
6613
+ [[ $_mssh_complete_alrm == - ]] && return 0
6614
+ if [[ -n $_mssh_complete_alrm ]]; then eval "$_mssh_complete_alrm"; else trap - ALRM; fi
6615
+ }
6616
+
6559
6617
  _mssh_complete_start() {
6560
6618
  # run the engine's picker or editor ("$@" prints its answer and returns its exit status): wait
6561
6619
  # MSSH_COMPLETE_START_TIMEOUT seconds (2) at most for it to say "ready", just before it takes the
6562
6620
  # terminal, then as long as the operator takes. Sets _mssh_complete_resp to its answer and
6563
6621
  # _mssh_complete_status to its exit status, 124 when it was not ready in time, 130 when Ctrl-C
6564
6622
  # came first. An engine ready too late finds nobody reading and leaves the terminal alone.
6565
- local _mssh_complete_line= _mssh_complete_rest= _mssh_complete_got=142 _mssh_complete_waited=0 _mssh_complete_tenths=20 _mssh_complete_trapped= _mssh_complete_interrupted=0
6623
+ local _mssh_complete_line= _mssh_complete_rest= _mssh_complete_got=142 _mssh_complete_waited=0 _mssh_complete_tenths=20 _mssh_complete_trapped= _mssh_complete_interrupted=0 _mssh_complete_alrm
6566
6624
  _mssh_complete_resp=
6567
6625
  _mssh_complete_status=124
6568
6626
  # in tenths of a second: bash counts in integers
@@ -6573,24 +6631,34 @@ _mssh_complete_start() {
6573
6631
  _mssh_complete_trapped=$(trap -p INT)
6574
6632
  trap '_mssh_complete_interrupted=1' INT
6575
6633
  fi
6634
+ _mssh_complete_alrm_off
6576
6635
  {
6577
6636
  # in short reads: a trapped Ctrl-C does not end a read. A byte at a time: bash reads a pipe one byte
6578
- # per call, and a read that times out partway through a line loses what it read of it (bash 4.2
6579
- # drops it, later ones keep it for the next read to write over); the rest of the line, written
6580
- # with its first byte, is there without waiting
6637
+ # per call, and a read that times out partway through a line loses what it read of it (bash 4.2 to
6638
+ # 4.4 drop it: they check the timer after the byte is read, before it is stored; 5.0 and later keep
6639
+ # it in the variable, with the status of a timeout); the rest of the line, written with its first
6640
+ # byte, is there without waiting. The byte that comes as the wait ends is such a partial read: the
6641
+ # variable is emptied before each read, and a byte in it counts as read
6581
6642
  while (( _mssh_complete_got > 128 && !_mssh_complete_interrupted && _mssh_complete_waited++ < _mssh_complete_tenths )); do
6643
+ _mssh_complete_line=
6582
6644
  IFS= read -r -t 0.1 -n 1 _mssh_complete_line && _mssh_complete_got=0 || _mssh_complete_got=$?
6645
+ [[ -n $_mssh_complete_line ]] && _mssh_complete_got=0
6583
6646
  done
6584
- if (( _mssh_complete_got == 0 )) && [[ -n $_mssh_complete_line ]]; then
6647
+ # the wait ended with nothing read, but the engine wrote as it ended (read -t 0: is there input): its line is there
6648
+ if { (( _mssh_complete_got == 0 )) && [[ -n $_mssh_complete_line ]]; } || { (( _mssh_complete_got > 128 )) && read -t 0; }; then
6649
+ _mssh_complete_got=0
6585
6650
  IFS= read -r _mssh_complete_rest || :
6586
6651
  _mssh_complete_line+=$_mssh_complete_rest
6587
6652
  fi
6588
6653
  (( _mssh_complete_got > 128 )) || IFS= read -r -d '' _mssh_complete_rest || :
6589
- } < <("$@" && status=0 || status=$?; trap '' PIPE; printf 'S %s\n' "$status" 2>/dev/null || :)
6654
+ } < <(trap - ALRM; "$@" && status=0 || status=$?; trap '' PIPE; printf 'S %s\n' "$status" 2>/dev/null || :)
6655
+ # first: a Ctrl-C after the INT trap is back would end this function with SIGALRM still ignored
6656
+ _mssh_complete_alrm_on
6590
6657
  if [[ -z ${BLE_VERSION-} ]]; then
6591
6658
  if [[ -n $_mssh_complete_trapped ]]; then eval "$_mssh_complete_trapped"; else trap - INT; fi
6592
6659
  fi
6593
- if [[ $_mssh_complete_line == ready ]]; then
6660
+ # eady: bash 4.2 to 4.4 dropped the r of ready (the loop stops at the first byte it reads: only that one)
6661
+ if [[ $_mssh_complete_line == ready || $_mssh_complete_line == eady ]]; then
6594
6662
  # it had the terminal: as cancelled unless it says otherwise
6595
6663
  _mssh_complete_status=1
6596
6664
  elif (( _mssh_complete_interrupted )); then
@@ -7042,13 +7110,18 @@ _mssh() {
7042
7110
  _mssh_complete_after="$SUFFIX ${(j: :)words[CURRENT+1,-1]}"
7043
7111
  _mssh_complete_read_locale
7044
7112
  _mssh_complete_flags="nosort=1 icase=0 zas=$(( ${+functions[_zsh_autosuggest_start]} )) term=$TERM $_mssh_complete_locale"
7045
- exec {_mssh_complete_qfd}< <(
7046
- {
7047
- print -rn -- "MSSHC1"$'\0'"zsh"$'\0'"$ZSH_VERSION"$'\0'"$_mssh_complete_flags"$'\0'"$_mssh_complete_before"$'\0'"$_mssh_complete_after"$'\0'"$PREFIX"$'\0'
7048
- fc -ln -${MSSH_COMPLETE_SHELL_HISTORY:-1000} 2>/dev/null
7049
- } | _mssh_complete_engine query 2>/dev/null
7050
- )
7051
- _mssh_complete_keep_terminal
7113
+ # job control off while the query starts, before zsh 5.8, and Ctrl-C ignored in it (see _mssh_complete_setup);
7114
+ # in a function of its own: a command's completion runs below in the shell's options
7115
+ () {
7116
+ (( _mssh_complete_grabs )) && setopt local_options no_monitor
7117
+ exec {_mssh_complete_qfd}< <(
7118
+ trap '' INT
7119
+ {
7120
+ print -rn -- "MSSHC1"$'\0'"zsh"$'\0'"$ZSH_VERSION"$'\0'"$_mssh_complete_flags"$'\0'"$_mssh_complete_before"$'\0'"$_mssh_complete_after"$'\0'"$PREFIX"$'\0'
7121
+ fc -ln -${MSSH_COMPLETE_SHELL_HISTORY:-1000} 2>/dev/null
7122
+ } | _mssh_complete_engine query 2>/dev/null
7123
+ )
7124
+ }
7052
7125
  (( _mssh_complete_end = EPOCHREALTIME + ${MSSH_COMPLETE_TIMEOUT:-0.3} ))
7053
7126
  _mssh_complete_resp=
7054
7127
  while true; do
@@ -7185,7 +7258,7 @@ _mssh_complete_compadd() {
7185
7258
  _mssh_complete_next_compadd "$@"
7186
7259
  return
7187
7260
  fi
7188
- emulate -L zsh -o extended_glob
7261
+ emulate -L zsh; setopt extended_glob
7189
7262
  local -a _mssh_complete_opts _mssh_complete_bare _mssh_complete_in _mssh_complete_out _mssh_complete_changed _mssh_complete_dirs
7190
7263
  local -a _mssh_complete_shown _mssh_complete_kept _mssh_complete_parts _mssh_complete_typed
7191
7264
  local _mssh_complete_arg _mssh_complete_letter _mssh_complete_name _mssh_complete_value _mssh_complete_prefix= _mssh_complete_word
@@ -7361,15 +7434,6 @@ _mssh_complete_start_pick() {
7361
7434
  command sh -c "$_mssh_complete_start_script" sh "$_mssh_complete_limit" @ENGINE@ pick
7362
7435
  }
7363
7436
 
7364
- _mssh_complete_keep_terminal() {
7365
- # after each `exec {fd}< <(...)`: before zsh 5.8 the process substitution takes the terminal from the
7366
- # shell (Ctrl-C then goes to it, and the shell's next reads can fail with "error on TTY read"); a
7367
- # command run in the foreground hands the terminal back when it ends, as zsh-autosuggestions does
7368
- # (its issue 364)
7369
- (( _mssh_complete_fork )) && [[ -o monitor ]] && command true
7370
- return 0
7371
- }
7372
-
7373
7437
  _mssh_complete_is_mssh() {
7374
7438
  # whether $1 is an mssh command line: an mssh name, then a space
7375
7439
  emulate -L zsh
@@ -7462,8 +7526,9 @@ _zsh_autosuggest_strategy_mssh() {
7462
7526
  local -i _mssh_complete_remaining
7463
7527
  # synchronous zsh-autosuggestions waits for the strategy while the operator types
7464
7528
  (( ${+ZSH_AUTOSUGGEST_USE_ASYNC} )) || _mssh_complete_limit=0.05
7465
- exec {_mssh_complete_qfd}< <(_mssh_complete_request 'ghost=1 zas=1 nul=0' "$1" '' | _mssh_complete_engine query 2>/dev/null)
7466
- _mssh_complete_keep_terminal
7529
+ # job control off while the query starts, before zsh 5.8, and Ctrl-C ignored in it (see _mssh_complete_setup)
7530
+ (( _mssh_complete_grabs )) && setopt local_options no_monitor
7531
+ exec {_mssh_complete_qfd}< <(trap '' INT; _mssh_complete_request 'ghost=1 zas=1 nul=0' "$1" '' | _mssh_complete_engine query 2>/dev/null)
7467
7532
  (( _mssh_complete_end = EPOCHREALTIME + _mssh_complete_limit ))
7468
7533
  while true; do
7469
7534
  (( _mssh_complete_remaining = (_mssh_complete_end - EPOCHREALTIME) * 100 ))
@@ -7574,8 +7639,9 @@ _mssh_complete_ghost_redraw() {
7574
7639
  _mssh_complete_ghost_cancel
7575
7640
  (( CURSOR == $#BUFFER )) && _mssh_complete_is_mssh "$BUFFER" || return 0
7576
7641
  _mssh_complete_asked=$BUFFER
7577
- exec {_mssh_complete_fd}< <(_mssh_complete_request 'ghost=1 nul=0' "$BUFFER" '' | _mssh_complete_engine query 2>/dev/null)
7578
- _mssh_complete_keep_terminal
7642
+ # job control off while the query starts, before zsh 5.8, and Ctrl-C ignored in it (see _mssh_complete_setup)
7643
+ (( _mssh_complete_grabs )) && setopt local_options no_monitor
7644
+ exec {_mssh_complete_fd}< <(trap '' INT; _mssh_complete_request 'ghost=1 nul=0' "$BUFFER" '' | _mssh_complete_engine query 2>/dev/null)
7579
7645
  zle -F $_mssh_complete_fd _mssh_complete_ghost_ready
7580
7646
  }
7581
7647
 
@@ -7695,10 +7761,12 @@ _mssh_complete_warn_cancel() {
7695
7761
  _mssh_complete_warn_ask() {
7696
7762
  # ask for warnings about the line, after $1 hundredths of a second
7697
7763
  _mssh_complete_warn_asked=$BUFFER$'\0'$CURSOR
7764
+ # job control off while the query starts, before zsh 5.8, and Ctrl-C ignored in it (see _mssh_complete_setup)
7765
+ (( _mssh_complete_grabs )) && setopt local_options no_monitor
7698
7766
  exec {_mssh_complete_warn_fd}< <(
7767
+ trap '' INT
7699
7768
  (( $1 > 0 )) && zselect -t $1
7700
7769
  _mssh_complete_request 'diag=1 nul=0' "$LBUFFER" "$RBUFFER" | _mssh_complete_engine query 2>/dev/null)
7701
- _mssh_complete_keep_terminal
7702
7770
  zle -F $_mssh_complete_warn_fd _mssh_complete_warn_ready
7703
7771
  }
7704
7772
 
@@ -7818,8 +7886,16 @@ _mssh_complete_setup() {
7818
7886
  # Ctrl-R, warnings, and grey text through zsh-autosuggestions when it is loaded, else with own widgets
7819
7887
  add-zsh-hook -d precmd _mssh_complete_setup
7820
7888
  autoload -Uz is-at-least
7821
- typeset -gi _mssh_complete_fork=0 _mssh_complete_memo=0
7822
- is-at-least 5.8 || _mssh_complete_fork=1
7889
+ # before zsh 5.8 (its change 44214) the process of an `exec {fd}< <(...)` makes itself the terminal's
7890
+ # foreground process group when the shell does job control: Ctrl-C went to the query and left the line,
7891
+ # and the shell's next read failed until zsh took the terminal back. The queries start with job control
7892
+ # off there (local_options: setting monitor again would make zsh take its process group anew): the
7893
+ # process stays in the shell's group, which keeps the terminal. A Ctrl-C then reaches the query too,
7894
+ # which ignores it (`trap '' INT`; from zsh 5.8 it has a process group of its own, which Ctrl-C does not
7895
+ # reach): a query ended by it made zsh 5.5 now and then drop the line only at the next key, and that
7896
+ # key with it
7897
+ typeset -gi _mssh_complete_grabs=0 _mssh_complete_memo=0
7898
+ is-at-least 5.8 || _mssh_complete_grabs=1
7823
7899
  # from zsh 5.9 a highlight can carry a memo: the glue's own are then told apart from other plugins'
7824
7900
  is-at-least 5.9 && _mssh_complete_memo=1
7825
7901
  _mssh_complete_take_ctrl_r
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: multiSSH3
3
- Version: 6.41
3
+ Version: 6.42
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
@@ -576,7 +576,15 @@ Hosts are checked in the background by `mssh-complete probe`: DNS, `ssh -G` (whi
576
576
 
577
577
  > With ble.sh, one of mssh's remote words (from its history) that names a directory on this machine goes in with `/` and no space ([limitations](docs/limitations.md#blesh-a-remote-word-of-msshs-that-names-a-local-directory-gets-a--and-no-space)), and a remote `~/...` path from mssh's history goes in with a bare `~`, which this shell expands to your local home ([limitations](docs/limitations.md#blesh-a-remote--path-from-msshs-history-goes-in-with-a-bare-)); plain bash keeps the space and inserts `\~`.
578
578
 
579
- > With ble.sh, a word that ble.sh splits at an `=` or `:` after a quote, a backslash or an expansion (`"a"=b`, `$V:x`) is read as in 6.39; a `~` after such a split comes back as this machine's home ([limitations](docs/limitations.md#blesh-a-word-split-at-an--or--after-a-quote-backslash-or-expansion-is-read-as-in-639)). On bash 4.3 and 4.4, a remote command's `-o noquote` is not seen, so the local file names completed for it are quoted ([limitations](docs/limitations.md#bash-43-and-44-a-remote-commands--o-noquote-is-not-seen)). With zsh before 5.8, a Ctrl-C during a completion query now and then reaches the query instead of the shell, as in 6.39; a fix is planned for the change after 6.40 ([limitations](docs/limitations.md#zsh-before-58-a-ctrl-c-during-a-completion-query-can-reach-the-query)).
579
+ > With ble.sh, a word that ble.sh splits at an `=` or `:` after a quote, a backslash or an expansion (`"a"=b`, `$V:x`) is read as in 6.39; a `~` after such a split comes back as this machine's home ([limitations](docs/limitations.md#blesh-a-word-split-at-an--or--after-a-quote-backslash-or-expansion-is-read-as-in-639)). On bash 4.3 and 4.4, a remote command's `-o noquote` is not seen, so the local file names completed for it are quoted ([limitations](docs/limitations.md#bash-43-and-44-a-remote-commands--o-noquote-is-not-seen)).
580
+
581
+ > With ble.sh, in a quoted word, ble.sh's second try (matching the typed letters in any order) finds nothing after a directory (`mssh h cat "sub/zzmp<TAB>`) or in a word holding a `$` expansion, a leading `~` or a quote of its own; typing the start of the name still completes ([limitations](docs/limitations.md#blesh-in-a-quoted-word-the-second-try-finds-nothing-after-a-directory-or-an-expansion)).
582
+
583
+ > In zsh and fish, a remote command's name also completes from this shell's internal functions (zsh's `_mssh_complete_take_ctrl_r`, fish's `fish_prompt` and the glue's `__mssh_complete*`), which bash and ble.sh leave out since 6.42; to be fixed after 6.42 ([limitations](docs/limitations.md#zsh-and-fish-offer-this-shells-own-functions-as-remote-command-names)).
584
+
585
+ > With zsh before 5.8 and zsh-autosuggestions in its default asynchronous mode, a Ctrl-C while typing an mssh line now and then keeps the line, as the plugin's own processes hold the terminal for a moment; press Ctrl-C again ([limitations](docs/limitations.md#zsh-before-58-with-zsh-autosuggestions-async-mode-a-ctrl-c-now-and-then-keeps-the-line)).
586
+
587
+ > On zsh before 5.3, mssh draws no grey text of its own and shows no warnings, as the zle hooks they need (`add-zle-hook-widget`) came in zsh 5.3; with zsh-autosuggestions loaded, its grey text still comes from mssh. TAB completion works.
580
588
 
581
589
  ## Options
582
590
 
@@ -984,7 +992,7 @@ Option names count in full only: `--user` is not `--username` and `-c` is not `-
984
992
 
985
993
  Putting the command after `--` is no substitute for quotes: every word after the hosts is a command of its own, so `mssh web1 -- bash -c 'echo hi'` runs `bash`, `-c` and `echo hi` one after another (when each word is a single word, as in `mssh web1 -- ls -la`, mssh asks whether to join them).
986
994
 
987
- Below is a sample help message output from multiSSH3 6.41 @ 2026-11-03 (no config file, 120 columns; the lines after the options list the programs found on that machine)
995
+ Below is a sample help message output from multiSSH3 6.42 @ 2026-11-04 (no config file, 120 columns; the lines after the options list the programs found on that machine)
988
996
 
989
997
  ```bash
990
998
  $ mssh -h
@@ -1398,6 +1406,24 @@ __DEBUG_MODE = False
1398
1406
 
1399
1407
  > `__DEBUG_MODE` is used to control whether to print host thread execution debug information to its stderr.
1400
1408
 
1409
+ ## Upgrading to 6.42 from 6.41
1410
+
1411
+ With zsh before 5.8 (zsh 5.5 is EL8's), run `mssh --completion install` again: the Ctrl-C fix below is in the new glue. Do the same in bash, with or without ble.sh, for the Ctrl-R, ble.sh and function-name fixes (fish's glue did not change; the quoted-argument fix needs no install). What you may notice:
1412
+
1413
+ - Fix (bash): a Ctrl-R pick or a Ctrl-X Ctrl-E edit was now and then dropped without a word, leaving the line as it was (about 1 in 50 to 100 on bash 5.2 in tests, less on other versions): the glue waits for the picker's "ready" in reads of 0.1 s, and when it arrived as one ran out, bash 5 kept its first byte where the next read wrote over it, and bash 4.2 to 4.4 dropped it. Both now count.
1414
+ - Fix (bash 4.2 and 4.3, e.g. CentOS 7's): the shell could end with "Alarm clock" on Ctrl-R or Ctrl-X Ctrl-E, about once in 1000, when the picker's answer came as a 0.1 s wait ran out (a bash bug fixed in 4.4). The glue now ignores SIGALRM during that wait and puts your own trap for it back after.
1415
+ - Fix (zsh 5.0.2, CentOS 7's): the first TAB in a remote command reset your own `setopt` options for the rest of the session (`emulate -L zsh -o ...` forgets `-L` there), so `glob_dots` and the like stopped working. They now stay. mssh's own grey text and warnings still need zsh 5.3; TAB completion works on 5.0.2.
1416
+
1417
+ - Fix (zsh before 5.8): a Ctrl-C during a completion query (a TAB, the grey text, the warnings) reaches the shell and drops the line. 6.41 and earlier now and then left the terminal with the query, so the Ctrl-C went to the query and the line stayed. The queries no longer take the terminal from the shell; zsh 5.8 and later were not affected. zsh-autosuggestions' own asynchronous fetch still takes it now and then (below).
1418
+ - Fix (ble.sh): when a word in a quote gets nothing, ble.sh's second try, which matches the typed letters in any order, now completes it by the quote's rules: `mssh h cat "zzmp<TAB>` with a file `zzamp&b` gives `cat "zzamp\\&b"`, `mssh h "cat zzmp<TAB>` gives `"cat zzamp\\&b"`, and `mssh -f "zzmp<TAB>` gives `-f "zzamp&b"`. 6.41 offered nothing there. A name holding whitespace stays out of a quoted argument, as on the first try.
1419
+ - Fix (bash, ble.sh): this shell's internal functions are no longer offered as remote command names: names starting with `_` (bash-completion's `_comp_*` and `_filedir`, the glue's own), bash-completion's `quote`, `dequote` and `quote_readline`, and ble.sh's `ble`, `ble-*`, `ble/*`, `bleopt` and `blehook`, unless a file here or a command on PATH has the name. Under ble.sh `mssh h bed<TAB>` could put in a ble.sh function, and `mssh h sudo "amb<TAB>` bash-completion's `_comp__reassemble_words`, which every host would then try to run. Your other functions and aliases (`module`, `ml`, `nvm`) are still offered, as in 6.41.
1420
+ - Fix (bash, ble.sh, zsh, fish): in a quoted argument after another quoted one, `mssh h grep 'a' "zz<TAB>` could put in a local name holding a space (`"zz\\ a"`), which mssh would run as a command of its own. mssh joins an argument without whitespace with the command's other words, quoted or not, so such names are now left out there too. After an argument holding whitespace (`'a b'`, `zz\ a`, `''`), which mssh runs as a command of its own, the word being typed completes as a new command name.
1421
+ - Known limits ([limitations](docs/limitations.md#found-in-642s-review)):
1422
+ - zsh and fish still offer this shell's internal functions as remote command names (zsh's `_mssh_complete_take_ctrl_r`, fish's `fish_prompt`); to be fixed after 6.42 ([limitations](docs/limitations.md#zsh-and-fish-offer-this-shells-own-functions-as-remote-command-names)).
1423
+ - ble.sh: in a quoted word, the second try finds nothing after a directory (`mssh h cat "sub/zzmp<TAB>`) or in a word holding a `$` expansion, a leading `~` or a quote of its own; type the start of the name ([limitations](docs/limitations.md#blesh-in-a-quoted-word-the-second-try-finds-nothing-after-a-directory-or-an-expansion)).
1424
+ - zsh before 5.8 with zsh-autosuggestions in its asynchronous mode (its default): a Ctrl-C while typing an mssh line now and then still keeps the line, as the plugin's own processes hold the terminal for a moment; press Ctrl-C again ([limitations](docs/limitations.md#zsh-before-58-with-zsh-autosuggestions-async-mode-a-ctrl-c-now-and-then-keeps-the-line)).
1425
+ - bash: in a window of microseconds at the end of the picker's start, the picker or the editor can still come up with nothing reading its answer; your choice is then not applied, so press Enter or Esc and try again ([limitations](docs/limitations.md#bash-the-picker-or-the-editor-can-come-up-with-nothing-reading-its-answer)).
1426
+
1401
1427
  ## Upgrading to 6.41 from 6.40
1402
1428
 
1403
1429
  Run `mssh --completion install` again (bash, ble.sh, zsh and fish) to get the new glue. What you may notice:
@@ -1421,7 +1447,6 @@ Run `mssh --completion install` again (bash, ble.sh, zsh and fish) to get the ne
1421
1447
  - readline and ble.sh: `mssh h ls ${VAR:-x}/zz<TAB>` writes a broken word (`${VAR:-x\\\}/...`), as 6.40 did ([limitations](docs/limitations.md#bash-a-default-value-expansion-in-a-remote-word-is-written-broken)).
1422
1448
  - In a quoted command, a word holding a `;`, `|` or `(` quoted for the remote shell (`mssh h "ls zz\\;<TAB>`) gets nothing more ([limitations](docs/limitations.md#a-name-holding---or--in-a-quoted-command-cannot-be-continued)).
1423
1449
  - Whitespace in names is read as UTF-8: in a Latin-1 or GBK locale (untested) a name may be offered or left out wrongly ([limitations](docs/limitations.md#whitespace-in-names-is-read-as-utf-8)).
1424
- - ble.sh: in a quoted word, letters typed out of order find nothing; only names that begin with what was typed are offered ([limitations](docs/limitations.md#blesh-letters-typed-out-of-order-in-a-quoted-word-find-nothing)).
1425
1450
  - bash: a directory completed in a quoted command closes the quote (`mssh h "ls zzd<TAB>` gives `"ls zzdir" `), as in 6.40, and so does one in a quoted argument whose name changes for the remote shell (`ls "zzd\\&x" `); to be fixed after 6.41 ([limitations](docs/limitations.md#a-directory-completed-in-a-quoted-command-or-argument-closes-the-quote)).
1426
1451
  - When PATH finds an mssh-complete older than the glue (a system install beside a newer venv, `sudo -i`), quoted arguments complete as in 6.40; install the same version ([limitations](docs/limitations.md#with-an-engine-older-than-the-glue-quoted-arguments-behave-as-in-640)).
1427
1452
  - zsh: `mssh h "ls $PWD/zzd<TAB>` rewrites the line to `ls\ /the/directory/zzd` and completes nothing, as in 6.40; to be fixed after 6.41 ([limitations](docs/limitations.md#zsh-a-variable-in-a-double-quoted-command-is-expanded-and-nothing-completes)).
@@ -42,10 +42,10 @@ from itertools import count, product
42
42
  from pprint import pformat
43
43
 
44
44
 
45
- version = '6.41'
45
+ version = '6.42'
46
46
  VERSION = version
47
47
  __version__ = version
48
- COMMIT_DATE = '2026-11-03'
48
+ COMMIT_DATE = '2026-11-04'
49
49
 
50
50
  # no current-directory entry: a cloned repo or unpacked archive could set a setting or a program path
51
51
  # (e.g. _sshPath), use --config_file to load one
@@ -3,6 +3,7 @@ import fcntl
3
3
  import json
4
4
  import os
5
5
  import pty
6
+ import re
6
7
  import select
7
8
  import shutil
8
9
  import signal
@@ -46,6 +47,16 @@ def require_shell(name):
46
47
  pytest.skip('{} is not installed'.format(name))
47
48
  return path
48
49
 
50
+ def zsh_version():
51
+ '''zsh's version as (major, minor).'''
52
+ output = subprocess.run([require_shell('zsh'), '-fc', 'print -r -- $ZSH_VERSION'], stdout=subprocess.PIPE, timeout=30).stdout
53
+ return tuple(int(part) for part in re.findall(r'\d+', output.decode('ascii', 'replace'))[:2])
54
+
55
+ def require_zsh_5_3():
56
+ '''Skip the test before zsh 5.3: the glue's own grey text and warnings are not set up there.'''
57
+ if zsh_version() < (5, 3):
58
+ pytest.skip("mssh's own grey text and warnings need zsh 5.3 (add-zle-hook-widget)")
59
+
49
60
  def bash_locale(env, multibyte=False):
50
61
  """
51
62
  How bash takes the locale the variables of env name, measured as bash's glue measures it: (utf8,
@@ -1,7 +1,8 @@
1
- # Shell matrix image: CentOS 7, bash only (end of life: packages come from the vault and archives)
1
+ # Shell matrix image: CentOS 7, bash 4.2 and zsh 5.0.2 (end of life: every package at its last vault build, 7.9.2009 and updates; EPEL, if ever needed, from archives.fedoraproject.org/pub/archive/epel/7)
2
2
  FROM centos:7
3
3
  RUN sed -i -e 's/^mirrorlist=/#mirrorlist=/' -e 's|^#\?baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|' /etc/yum.repos.d/CentOS-*.repo \
4
- && yum -y -q install python3 bash-completion which procps-ng xz gawk \
4
+ && yum -y -q update \
5
+ && yum -y -q install python3 bash-completion zsh which procps-ng xz gawk \
5
6
  && yum clean all \
6
7
  && python3 -m pip install -q --disable-pip-version-check 'pip<22' \
7
8
  && python3 -m pip install -q --disable-pip-version-check 'pytest==7.0.1'
@@ -17,7 +17,7 @@ required=()
17
17
  pids=()
18
18
  for name in "${images[@]}"; do
19
19
  case $name in
20
- centos7) required+=(bash,blesh) ;;
20
+ centos7) required+=(bash,zsh,blesh) ;;
21
21
  bash5.1|bash5.3) required+=(bash) ;;
22
22
  modern|current|legacy|el9) required+=(bash,zsh,fish,blesh,zas,zsh-syntax-highlighting) ;;
23
23
  *) echo "unknown image: $name" >&2; exit 2 ;;
@@ -152,8 +152,10 @@ def history_of(*commands):
152
152
  # a ~ typed stays as typed (ble.sh expands it here before the glue sees it), the history's path completes
153
153
  ('mssh h cat ~/zzn', ['cat ~/zznotes.txt'], ['mssh', 'h', 'cat', '~/zznotes.txt']),
154
154
  # a backslash or a quote in a word before the current one no longer makes the current one a command name (6.39 read
155
- # ble.sh's requoted 'zz a' as a quoted word and completed the command alias)
156
- ('mssh h fakecmd zz\\ a al', [], ['mssh', 'h', 'fakecmd', 'zz a', 'alpha']),
155
+ # ble.sh's requoted 'zz&a' as a quoted word and completed the command alias). mssh joins every word without whitespace,
156
+ # quoted or not; after one holding whitespace (zz\\ a) it runs each word as a command of its own
157
+ ('mssh h fakecmd zz\\&a al', [], ['mssh', 'h', 'fakecmd', 'zz&a', 'alpha']),
158
+ ("mssh h fakecmd 'zz' al", [], ['mssh', 'h', 'fakecmd', 'zz', 'alpha']),
157
159
  ])
158
160
  def test_blesh_tab_reads_the_line_as_typed(tmp_path, typed, history, expected):
159
161
  assert words(blesh_line(tmp_path, typed, history=history_of(*history))) == expected
@@ -120,7 +120,8 @@ def test_a_command_after_double_dash_and_hosts_starts_at_its_first_word():
120
120
  ('mssh h ls -- ', '', ['ls', ''], 1),
121
121
  ('mssh h -- ls -- -l', '', ['ls', '--', '-l'], 2),
122
122
  ('mssh h -- l', ' -la', ['l'], 0),
123
- ("mssh h 'uptime' -- l", '', ['l'], 0),
123
+ # (a quoted word without whitespace is one of them: mssh h 'uptime' -- l runs "uptime l")
124
+ ("mssh h 'uptime' -- l", '', ['uptime', 'l'], 1),
124
125
  ])
125
126
  def test_double_dash_between_command_words_does_not_split_the_command(before, after, words, index):
126
127
  context = mc.parse_context(before, after, SPEC)