multiSSH3 6.49__tar.gz → 6.50__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 (120) hide show
  1. {multissh3-6.49/multiSSH3.egg-info → multissh3-6.50}/PKG-INFO +12 -1
  2. {multissh3-6.49 → multissh3-6.50}/README.md +11 -0
  3. {multissh3-6.49 → multissh3-6.50}/mssh_complete.py +132 -31
  4. {multissh3-6.49 → multissh3-6.50/multiSSH3.egg-info}/PKG-INFO +12 -1
  5. {multissh3-6.49 → multissh3-6.50}/multiSSH3.py +2 -2
  6. {multissh3-6.49 → multissh3-6.50}/tests/complete_shell_harness.py +3 -3
  7. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_shells.py +408 -21
  8. {multissh3-6.49 → multissh3-6.50}/LICENSE +0 -0
  9. {multissh3-6.49 → multissh3-6.50}/MANIFEST.in +0 -0
  10. {multissh3-6.49 → multissh3-6.50}/multiSSH3.egg-info/SOURCES.txt +0 -0
  11. {multissh3-6.49 → multissh3-6.50}/multiSSH3.egg-info/dependency_links.txt +0 -0
  12. {multissh3-6.49 → multissh3-6.50}/multiSSH3.egg-info/entry_points.txt +0 -0
  13. {multissh3-6.49 → multissh3-6.50}/multiSSH3.egg-info/top_level.txt +0 -0
  14. {multissh3-6.49 → multissh3-6.50}/pytest.ini +0 -0
  15. {multissh3-6.49 → multissh3-6.50}/scripts/multiSSH3 +0 -0
  16. {multissh3-6.49 → multissh3-6.50}/setup.cfg +0 -0
  17. {multissh3-6.49 → multissh3-6.50}/setup.py +0 -0
  18. {multissh3-6.49 → multissh3-6.50}/tests/bench_complete.py +0 -0
  19. {multissh3-6.49 → multissh3-6.50}/tests/conftest.py +0 -0
  20. {multissh3-6.49 → multissh3-6.50}/tests/data/run_command_golden.json +0 -0
  21. {multissh3-6.49 → multissh3-6.50}/tests/data/zsh_double_quote_shapes.json +0 -0
  22. {multissh3-6.49 → multissh3-6.50}/tests/data/zsh_double_quote_shapes_6.46.json +0 -0
  23. {multissh3-6.49 → multissh3-6.50}/tests/replay.py +0 -0
  24. {multissh3-6.49 → multissh3-6.50}/tests/shells/Dockerfile.bash3.2 +0 -0
  25. {multissh3-6.49 → multissh3-6.50}/tests/shells/Dockerfile.bash5.0 +0 -0
  26. {multissh3-6.49 → multissh3-6.50}/tests/shells/Dockerfile.bash5.1 +0 -0
  27. {multissh3-6.49 → multissh3-6.50}/tests/shells/Dockerfile.bash5.3 +0 -0
  28. {multissh3-6.49 → multissh3-6.50}/tests/shells/Dockerfile.centos7 +0 -0
  29. {multissh3-6.49 → multissh3-6.50}/tests/shells/Dockerfile.current +0 -0
  30. {multissh3-6.49 → multissh3-6.50}/tests/shells/Dockerfile.el10 +0 -0
  31. {multissh3-6.49 → multissh3-6.50}/tests/shells/Dockerfile.el9 +0 -0
  32. {multissh3-6.49 → multissh3-6.50}/tests/shells/Dockerfile.legacy +0 -0
  33. {multissh3-6.49 → multissh3-6.50}/tests/shells/Dockerfile.modern +0 -0
  34. {multissh3-6.49 → multissh3-6.50}/tests/shells/run_matrix.sh +0 -0
  35. {multissh3-6.49 → multissh3-6.50}/tests/test_cli_branches.py +0 -0
  36. {multissh3-6.49 → multissh3-6.50}/tests/test_cli_option_words.py +0 -0
  37. {multissh3-6.49 → multissh3-6.50}/tests/test_cli_processing.py +0 -0
  38. {multissh3-6.49 → multissh3-6.50}/tests/test_closed_output.py +0 -0
  39. {multissh3-6.49 → multissh3-6.50}/tests/test_color_helpers.py +0 -0
  40. {multissh3-6.49 → multissh3-6.50}/tests/test_command_terminal.py +0 -0
  41. {multissh3-6.49 → multissh3-6.50}/tests/test_compact_hostnames.py +0 -0
  42. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_blesh.py +0 -0
  43. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_cli.py +0 -0
  44. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_context.py +0 -0
  45. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_diagnose.py +0 -0
  46. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_editor.py +0 -0
  47. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_engine.py +0 -0
  48. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_eval.py +0 -0
  49. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_harness.py +0 -0
  50. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_hosts.py +0 -0
  51. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_hoststate.py +0 -0
  52. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_index.py +0 -0
  53. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_keys.py +0 -0
  54. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_lex.py +0 -0
  55. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_mssh_helpers.py +0 -0
  56. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_password_spellings.py +0 -0
  57. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_picker.py +0 -0
  58. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_probe.py +0 -0
  59. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_start.py +0 -0
  60. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_store.py +0 -0
  61. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_suggest.py +0 -0
  62. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_terminal.py +0 -0
  63. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_untrusted.py +0 -0
  64. {multissh3-6.49 → multissh3-6.50}/tests/test_complete_zsh_options.py +0 -0
  65. {multissh3-6.49 → multissh3-6.50}/tests/test_config_cli.py +0 -0
  66. {multissh3-6.49 → multissh3-6.50}/tests/test_config_validate.py +0 -0
  67. {multissh3-6.49 → multissh3-6.50}/tests/test_config_values.py +0 -0
  68. {multissh3-6.49 → multissh3-6.50}/tests/test_control_master_config.py +0 -0
  69. {multissh3-6.49 → multissh3-6.50}/tests/test_copy_id.py +0 -0
  70. {multissh3-6.49 → multissh3-6.50}/tests/test_curses_branches.py +0 -0
  71. {multissh3-6.49 → multissh3-6.50}/tests/test_curses_event_loop.py +0 -0
  72. {multissh3-6.49 → multissh3-6.50}/tests/test_curses_tui.py +0 -0
  73. {multissh3-6.49 → multissh3-6.50}/tests/test_curses_wide_chars.py +0 -0
  74. {multissh3-6.49 → multissh3-6.50}/tests/test_expand_hostnames.py +0 -0
  75. {multissh3-6.49 → multissh3-6.50}/tests/test_file_trust.py +0 -0
  76. {multissh3-6.49 → multissh3-6.50}/tests/test_harness_smoke.py +0 -0
  77. {multissh3-6.49 → multissh3-6.50}/tests/test_helpers_extra.py +0 -0
  78. {multissh3-6.49 → multissh3-6.50}/tests/test_history_replay.py +0 -0
  79. {multissh3-6.49 → multissh3-6.50}/tests/test_host.py +0 -0
  80. {multissh3-6.49 → multissh3-6.50}/tests/test_host_validity.py +0 -0
  81. {multissh3-6.49 → multissh3-6.50}/tests/test_hosts_file.py +0 -0
  82. {multissh3-6.49 → multissh3-6.50}/tests/test_identities_only.py +0 -0
  83. {multissh3-6.49 → multissh3-6.50}/tests/test_ipmi_lockout_wait.py +0 -0
  84. {multissh3-6.49 → multissh3-6.50}/tests/test_ipmi_logins.py +0 -0
  85. {multissh3-6.49 → multissh3-6.50}/tests/test_key_path_home.py +0 -0
  86. {multissh3-6.49 → multissh3-6.50}/tests/test_login_drop_retry.py +0 -0
  87. {multissh3-6.49 → multissh3-6.50}/tests/test_main_lifecycle.py +0 -0
  88. {multissh3-6.49 → multissh3-6.50}/tests/test_narrow_terminal.py +0 -0
  89. {multissh3-6.49 → multissh3-6.50}/tests/test_no_hosts.py +0 -0
  90. {multissh3-6.49 → multissh3-6.50}/tests/test_option_no_effect.py +0 -0
  91. {multissh3-6.49 → multissh3-6.50}/tests/test_options_after_command.py +0 -0
  92. {multissh3-6.49 → multissh3-6.50}/tests/test_output_merge.py +0 -0
  93. {multissh3-6.49 → multissh3-6.50}/tests/test_output_robustness.py +0 -0
  94. {multissh3-6.49 → multissh3-6.50}/tests/test_packaging.py +0 -0
  95. {multissh3-6.49 → multissh3-6.50}/tests/test_password_handling.py +0 -0
  96. {multissh3-6.49 → multissh3-6.50}/tests/test_passwords_out_of_ps.py +0 -0
  97. {multissh3-6.49 → multissh3-6.50}/tests/test_run_command.py +0 -0
  98. {multissh3-6.49 → multissh3-6.50}/tests/test_run_command_branches.py +0 -0
  99. {multissh3-6.49 → multissh3-6.50}/tests/test_run_command_characterization.py +0 -0
  100. {multissh3-6.49 → multissh3-6.50}/tests/test_run_command_exit.py +0 -0
  101. {multissh3-6.49 → multissh3-6.50}/tests/test_run_on_hosts.py +0 -0
  102. {multissh3-6.49 → multissh3-6.50}/tests/test_run_on_hosts_modes.py +0 -0
  103. {multissh3-6.49 → multissh3-6.50}/tests/test_runtime_branch_matrix.py +0 -0
  104. {multissh3-6.49 → multissh3-6.50}/tests/test_runtime_dir.py +0 -0
  105. {multissh3-6.49 → multissh3-6.50}/tests/test_shared_lines.py +0 -0
  106. {multissh3-6.49 → multissh3-6.50}/tests/test_smoke_optional.py +0 -0
  107. {multissh3-6.49 → multissh3-6.50}/tests/test_ssh_error_text.py +0 -0
  108. {multissh3-6.49 → multissh3-6.50}/tests/test_ssh_timeouts.py +0 -0
  109. {multissh3-6.49 → multissh3-6.50}/tests/test_sshpass_exit.py +0 -0
  110. {multissh3-6.49 → multissh3-6.50}/tests/test_start_run_on_hosts.py +0 -0
  111. {multissh3-6.49 → multissh3-6.50}/tests/test_stopped_commands.py +0 -0
  112. {multissh3-6.49 → multissh3-6.50}/tests/test_stream_reader.py +0 -0
  113. {multissh3-6.49 → multissh3-6.50}/tests/test_streamed_output.py +0 -0
  114. {multissh3-6.49 → multissh3-6.50}/tests/test_tui_ssh_notices.py +0 -0
  115. {multissh3-6.49 → multissh3-6.50}/tests/test_unavailable_hosts.py +0 -0
  116. {multissh3-6.49 → multissh3-6.50}/tests/test_underscore_settings.py +0 -0
  117. {multissh3-6.49 → multissh3-6.50}/tests/test_waiting.py +0 -0
  118. {multissh3-6.49 → multissh3-6.50}/tests/test_wide_wrap.py +0 -0
  119. {multissh3-6.49 → multissh3-6.50}/tests/vt_grid.py +0 -0
  120. {multissh3-6.49 → multissh3-6.50}/tests/zsh_shapes_probe.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: multiSSH3
3
- Version: 6.49
3
+ Version: 6.50
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
@@ -1416,6 +1416,17 @@ __DEBUG_MODE = False
1416
1416
 
1417
1417
  > `__DEBUG_MODE` is used to control whether to print host thread execution debug information to its stderr.
1418
1418
 
1419
+ ## Upgrading to 6.50 from 6.49
1420
+
1421
+ Run `mssh --completion install` again (zsh): the fixes below are in the new glue. What you may notice:
1422
+
1423
+ - Fix (zsh): TAB in a directory no longer writes a start that a history name further down lacks: with `zzdir/zzlocal` here and `cat zzdir/sub/zzremote` in history, `mssh h cat zzdir/<TAB>` stays at `zzdir/` (6.49: `zzdir/zz`), and `mssh h cat zzdir/s<TAB>` gives `zzdir/sub/zzremote`.
1424
+ - Fix (zsh): in a quoted command, a `/` in an earlier word no longer keeps history names out: `mssh h "ls /etc --col<TAB>` offers `--colzz` from history beside `ls`'s `--color=`.
1425
+ - Fix (zsh 5.3 and later): in a quoted command, TAB keeps the quote and the words typed that zsh itself would drop, where zsh shows its list, and the next TAB picks from it: `mssh h "df /etc -<TAB><TAB>` gives `mssh h "df /etc --all` (6.49 on zsh 5.4 to 5.9.0: `mssh h "df `).
1426
+ - Fix (zsh 5.0.2): one TAB that passes tens of thousands of plain names, with a command typed as words or in a single-quoted command, outside backticks, takes 1.2 to 2 s at 40,000 names (6.49: 16 to 19 s).
1427
+ - Change (zsh): with bang_hist on, a name holding `!` is not offered in a double quote the remote command opens in a quoted command (`mssh h "cat \"zz<TAB>`); 6.49 wrote `\"zz\\\!x\"` for it, which the remote shell got as `zz\!x`.
1428
+ - Known (zsh): ten entries deferred to 6.51 in [limitations](docs/limitations.md), among them a history name beside a directory that still stops TAB before its `/`, and zsh 5.0.2's TAB time with tens of thousands of names in a double-quoted command.
1429
+
1419
1430
  ## Upgrading to 6.49 from 6.48
1420
1431
 
1421
1432
  Run `mssh --completion install` again (bash): the fixes below are in the new glue. What you may notice:
@@ -1390,6 +1390,17 @@ __DEBUG_MODE = False
1390
1390
 
1391
1391
  > `__DEBUG_MODE` is used to control whether to print host thread execution debug information to its stderr.
1392
1392
 
1393
+ ## Upgrading to 6.50 from 6.49
1394
+
1395
+ Run `mssh --completion install` again (zsh): the fixes below are in the new glue. What you may notice:
1396
+
1397
+ - Fix (zsh): TAB in a directory no longer writes a start that a history name further down lacks: with `zzdir/zzlocal` here and `cat zzdir/sub/zzremote` in history, `mssh h cat zzdir/<TAB>` stays at `zzdir/` (6.49: `zzdir/zz`), and `mssh h cat zzdir/s<TAB>` gives `zzdir/sub/zzremote`.
1398
+ - Fix (zsh): in a quoted command, a `/` in an earlier word no longer keeps history names out: `mssh h "ls /etc --col<TAB>` offers `--colzz` from history beside `ls`'s `--color=`.
1399
+ - Fix (zsh 5.3 and later): in a quoted command, TAB keeps the quote and the words typed that zsh itself would drop, where zsh shows its list, and the next TAB picks from it: `mssh h "df /etc -<TAB><TAB>` gives `mssh h "df /etc --all` (6.49 on zsh 5.4 to 5.9.0: `mssh h "df `).
1400
+ - Fix (zsh 5.0.2): one TAB that passes tens of thousands of plain names, with a command typed as words or in a single-quoted command, outside backticks, takes 1.2 to 2 s at 40,000 names (6.49: 16 to 19 s).
1401
+ - Change (zsh): with bang_hist on, a name holding `!` is not offered in a double quote the remote command opens in a quoted command (`mssh h "cat \"zz<TAB>`); 6.49 wrote `\"zz\\\!x\"` for it, which the remote shell got as `zz\!x`.
1402
+ - Known (zsh): ten entries deferred to 6.51 in [limitations](docs/limitations.md), among them a history name beside a directory that still stops TAB before its `/`, and zsh 5.0.2's TAB time with tens of thousands of names in a double-quoted command.
1403
+
1393
1404
  ## Upgrading to 6.49 from 6.48
1394
1405
 
1395
1406
  Run `mssh --completion install` again (bash): the fixes below are in the new glue. What you may notice:
@@ -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.22'
24
+ version = '0.23'
25
25
  __version__ = version
26
26
  PROTOCOL = 'MSSHC1'
27
27
  MSSH_NAMES = ('mssh', 'mssh3', 'multissh', 'multissh3', 'multiSSH3')
@@ -7280,6 +7280,8 @@ _mssh() {
7280
7280
  local -i _mssh_complete_dq=0 _mssh_complete_dq_ipre=0 _mssh_complete_ticked=0 _mssh_complete_texts_in=$compstate[nmatches] _mssh_complete_qkept=0
7281
7281
  local -i _mssh_complete_texts_beside=0
7282
7282
  local _mssh_complete_texts_typed= _mssh_complete_texts_read= _mssh_complete_tilde= _mssh_complete_split_typed= _mssh_complete_typed_last=
7283
+ # (the word at the cursor of the text typed, as the remote shell splits it: _mssh_complete_add_texts)
7284
+ local _mssh_complete_texts_last=
7283
7285
  local _mssh_complete_dq_quote= _mssh_complete_dq_typed=
7284
7286
  # (a quote the command opened in the word at the cursor, in a double-quoted command holding an expansion: ' or ", _mssh_complete_in_word)
7285
7287
  local _mssh_complete_inner=
@@ -7437,6 +7439,17 @@ _mssh() {
7437
7439
  # (mssh's own words go in as the double quote has them, as zsh does where it keeps the quote and this goes in with -Q: the
7438
7440
  # part typed (PREFIX) as it was, its $PWD this shell's, and the rest quoted: a history word's " or $HOME is the remote command's)
7439
7441
  _mssh_complete_texts_typed=$PREFIX
7442
+ # (the word at the cursor: in a quoted command and after a quote at an =, the last word of the text typed as the remote shell splits it,
7443
+ # an escaped blank inside its word, none after a blank; in a word of its own the whole text)
7444
+ _mssh_complete_texts_last=$PREFIX
7445
+ if (( _mssh_complete_qcommand )) || [[ -n $_mssh_complete_lead ]]; then
7446
+ _mssh_complete_read=$PREFIX
7447
+ (( _mssh_complete_ticked )) && _mssh_complete_tick_read "$_mssh_complete_read"
7448
+ [[ $_mssh_complete_open == \" ]] && _mssh_complete_dq_read "$_mssh_complete_read"
7449
+ _mssh_complete_fields=("${(z)_mssh_complete_read}")
7450
+ _mssh_complete_texts_last=$_mssh_complete_fields[-1]
7451
+ [[ $_mssh_complete_read == *[[:space:]] && $_mssh_complete_texts_last != *[[:space:]] ]] && _mssh_complete_texts_last=
7452
+ fi
7440
7453
  if (( _mssh_complete_dq )); then
7441
7454
  for (( _mssh_complete_offset = 1; _mssh_complete_offset <= $#_mssh_complete_texts; _mssh_complete_offset++ )); do
7442
7455
  _mssh_complete_item=$_mssh_complete_texts[_mssh_complete_offset]
@@ -7509,16 +7522,19 @@ _mssh() {
7509
7522
  }
7510
7523
 
7511
7524
  _mssh_complete_add_texts() {
7512
- # mssh's own words of _mssh, in the word they are for (zsh puts back the word as it was when this returns). $1 first: the words
7513
- # whole, before the completions' names, as zsh puts in what all share only with them first; not in a word holding a / (a quoted
7514
- # command's, anywhere in the quote). There, after the completions: each word that starts with the text typed up to its last / or
7515
- # blank goes in as _files puts in its names, that text as typed in front (-p), the rest written for the quote open, -Q, and its
7516
- # matcher (with no matcher beside the one of _files zsh cut the line back too), so zsh finds what they and the command's names
7517
- # start with alike (whole beside a name of _files, which stands behind its directory, they shared nothing, and TAB cut the line
7518
- # back: mssh h cat ~/.zz became mssh h cat ). Not in a quoted command (the completion reads the word in it: compset -q), a double
7519
- # quote zsh keeps no quote for (_mssh_complete_dq) or after a quote at an =: there zsh cut the line back again. The other words, and every word there, go in whole when nothing was added. Inside backticks each word gets the level
7520
- # they read (_mssh_complete_tick): the rest of a word zsh writes before it does, a word of -Q (the double quote's of
7521
- # _mssh_complete_dq, the rest written here) as it goes in
7525
+ # mssh's own words of _mssh, in the word they are for (zsh puts back the word as it was when this returns). zsh writes what all
7526
+ # matches share as worked out from each one's whole line, cut at the anchors of its call's matcher, and drops what calls with other
7527
+ # matchers or prefixes do not pair: a word goes in right only whole and first, with no matcher, or in the command's own file call
7528
+ # (_mssh_complete_compadd). $1 first: the words whole, before the completions' names, where the word at the cursor holds no /
7529
+ # (_mssh_complete_texts_last: a / in an earlier word of a quoted command is none). after: in a word holding a /, the words no file
7530
+ # call took (the command's file names: there each goes in part by part, _mssh_complete_compadd). Each word that starts with the text
7531
+ # typed up to its last / or blank goes in as _files puts in its names, that text as typed in front (-p), the rest written for the
7532
+ # quote open, -Q, and its matcher, so zsh finds what they and the command's names start with alike (whole beside a name of _files,
7533
+ # which stands behind its directory, they shared nothing, and TAB cut the line back: mssh h cat ~/.zz became mssh h cat ). Not in a
7534
+ # quoted command (the completion reads the word in it: compset -q), a double quote zsh keeps no quote for (_mssh_complete_dq) or
7535
+ # after a quote at an =: there zsh cut the line back again. The other words, and every word there, go in whole when nothing was
7536
+ # added. Inside backticks each word gets the level they read (_mssh_complete_tick): the rest of a word zsh writes before it does,
7537
+ # a word of -Q (the double quote's of _mssh_complete_dq, the rest written here) as it goes in
7522
7538
  if (( _mssh_complete_delegating )) && [[ -n $_mssh_complete_lead ]]; then
7523
7539
  IPREFIX=$_mssh_complete_lead\"
7524
7540
  PREFIX=$_mssh_complete_value
@@ -7527,11 +7543,13 @@ _mssh_complete_add_texts() {
7527
7543
  local -a _mssh_complete_shown _mssh_complete_whole _mssh_complete_whole_shown _mssh_complete_bwords _mssh_complete_bshown
7528
7544
  local -i _mssh_complete_at _mssh_complete_split=0
7529
7545
  if [[ $1 == first ]]; then
7530
- [[ $PREFIX == */* ]] && return 0
7546
+ [[ $_mssh_complete_texts_last == */* ]] && return 0
7531
7547
  _mssh_complete_whole_shown=("${_mssh_complete_listed[@]}")
7532
7548
  _mssh_complete_whole=("${_mssh_complete_texts[@]}")
7533
7549
  else
7534
- [[ $PREFIX == */* ]] || return 0
7550
+ # (the words a file call of the command's took, part by part, are in: _mssh_complete_compadd)
7551
+ (( _mssh_complete_texts_beside )) && return 0
7552
+ [[ $_mssh_complete_texts_last == */* ]] || return 0
7535
7553
  # (mssh's own file option after its =: the completion reads the name alone, compset -P of _mssh_complete_in_word; with nothing
7536
7554
  # beside them nothing is cut back, and the directory typed stays as typed there too, a ~/ this shell's, as without TAB)
7537
7555
  (( ! _mssh_complete_qcommand && ! _mssh_complete_dq )) && [[ -z $_mssh_complete_lead ]] &&
@@ -7766,7 +7784,8 @@ _mssh_complete_in_word() {
7766
7784
  # (1. what the remote shell expands and this machine cannot: a $, a backtick, a brace, a parenthesis, and a pattern character
7767
7785
  # unless the completion matches patterns itself (glob_complete), left in the directories typed once the escaped characters are
7768
7786
  # taken off. The names of another directory would go in, so nothing is offered, as for a directory typed bare (limitations,
7769
- # "a directory the remote shell would read otherwise"). A < or > is no part of a word here: the split ends it there)
7787
+ # "a directory the remote shell would read otherwise"). A < or > is no part of a word here: the split ends it there. Only * ?
7788
+ # and [ : a # ^ or ~ inside a directory's name is plain text to the remote shell, and such a directory is offered, as in 6.49)
7770
7789
  _mssh_complete_item=$PREFIX
7771
7790
  if [[ $PREFIX == */* ]]; then
7772
7791
  _mssh_complete_read=${${PREFIX%/*}//\\?}
@@ -7805,6 +7824,12 @@ _mssh_complete_in_word() {
7805
7824
  words=("${(@)words[_mssh_complete_offset,-1]}")
7806
7825
  (( CURRENT = CURRENT - _mssh_complete_offset + 1 ))
7807
7826
  if [[ $_mssh_complete_what == names ]]; then
7827
+ # (what goes in must keep the words typed before the word at the cursor, and its quote: _mssh_complete_keep_head, once the
7828
+ # completion system has decided)
7829
+ if [[ -n $QIPREFIX$IPREFIX ]]; then
7830
+ typeset -g _mssh_complete_kept_head=$QIPREFIX$IPREFIX _mssh_complete_kept_word=$PREFIX _mssh_complete_kept_line=$CURSOR:$BUFFER
7831
+ (( ${comppostfuncs[(Ie)_mssh_complete_keep_head]} )) || comppostfuncs+=(_mssh_complete_keep_head)
7832
+ fi
7808
7833
  _normal
7809
7834
  # _normal has done what zsh does for the remote command: without this, _dispatch goes on to the
7810
7835
  # post-pattern completions (python-argcomplete's `#compdef -P *`), which add local file names
@@ -8020,7 +8045,7 @@ _mssh_complete_compadd() {
8020
8045
  local -i _mssh_complete_at=1 _mssh_complete_char _mssh_complete_quoted=0 _mssh_complete_arrays=0 _mssh_complete_filter=0
8021
8046
  local -i _mssh_complete_plain=0 _mssh_complete_file=0 _mssh_complete_shown_at=0 _mssh_complete_shown_bare=0 _mssh_complete_hidden_at=0 _mssh_complete_index
8022
8047
  local -i _mssh_complete_hidden_bare=0 _mssh_complete_rc=1 _mssh_complete_keys=0 _mssh_complete_suffixed=0 _mssh_complete_listing=0 _mssh_complete_atcommand=0
8023
- local -i _mssh_complete_at_equals=0
8048
+ local -i _mssh_complete_at_equals=0 _mssh_complete_took=0
8024
8049
  [[ $curcontext == *:-command-:* ]] && _mssh_complete_atcommand=1
8025
8050
  # (how the words of this call reach the line: written for it already, with -Q, or raw, which zsh writes: _mssh_complete_tick)
8026
8051
  local _mssh_complete_tickas=raw
@@ -8269,7 +8294,17 @@ _mssh_complete_compadd() {
8269
8294
  fi
8270
8295
  fi
8271
8296
  (( _mssh_complete_shown_at )) && _mssh_complete_shown=("${(@P)_mssh_complete_opts[_mssh_complete_shown_at]}")
8272
- for (( _mssh_complete_index = 1; _mssh_complete_index <= $#_mssh_complete_in; _mssh_complete_index++ )); do
8297
+ # (where no rule below reads anything of the names, a command typed as words or after compset -q, outside backticks, and no name holds
8298
+ # a character any rule reads, they go on as they came, with no loop: zsh 5.0.2 appends to an array in time that grows with its length,
8299
+ # about 15 s for 40,000 names; 5.5.1 and later take under a second)
8300
+ local -i _mssh_complete_count=$#_mssh_complete_in
8301
+ if (( ! _mssh_complete_dq && ! _mssh_complete_ticked && ! _mssh_complete_banging && ! _mssh_complete_nested && ! _mssh_complete_listing && ! _mssh_complete_atcommand )) &&
8302
+ [[ -z ${(M)_mssh_complete_in:#(\~*|*[^[:alnum:]_.,:=+@%/-]*)} ]]; then
8303
+ _mssh_complete_out=("${_mssh_complete_in[@]}")
8304
+ (( _mssh_complete_shown_at )) && _mssh_complete_kept=("${(@)_mssh_complete_shown[1,$#_mssh_complete_in]}")
8305
+ _mssh_complete_count=0
8306
+ fi
8307
+ for (( _mssh_complete_index = 1; _mssh_complete_index <= _mssh_complete_count; _mssh_complete_index++ )); do
8273
8308
  _mssh_complete_word=$_mssh_complete_in[_mssh_complete_index]
8274
8309
  _mssh_complete_name=$_mssh_complete_word
8275
8310
  (( _mssh_complete_quoted )) && _mssh_complete_name=${(Q)_mssh_complete_word}
@@ -8282,6 +8317,12 @@ _mssh_complete_compadd() {
8282
8317
  _mssh_complete_nodefault=1
8283
8318
  continue
8284
8319
  fi
8320
+ # (with bang_hist on, a name holding a ! in a double quote the remote command opens in a quoted command, which zsh writes after
8321
+ # compset -q for its own double quote, \!: the remote shell's double quote keeps the backslash, and got zz\!x for zz!x. Left out)
8322
+ if (( ${_mssh_complete_qcommand:-0} && ! _mssh_complete_dq && ! _mssh_complete_filter )) && [[ $compstate[quote] == \" &&
8323
+ ${_mssh_complete_compsys_options[banghist]-} == on && $_mssh_complete_name == *\!* ]]; then
8324
+ continue
8325
+ fi
8285
8326
  # (a word of -Q for the double quote zsh keeps, as _files writes them: its ! outside the quote)
8286
8327
  if (( _mssh_complete_banging && _mssh_complete_quoted && ! _mssh_complete_dq )) && [[ $_mssh_complete_word == *\!* ]]; then
8287
8328
  _mssh_complete_inq=$_mssh_complete_word
@@ -8425,28 +8466,88 @@ _mssh_complete_compadd() {
8425
8466
  fi
8426
8467
  (( $#_mssh_complete_changed )) && _mssh_complete_next_compadd "${_mssh_complete_bare[@]}" "${_mssh_complete_closing_opts[@]}" - "${_mssh_complete_changed[@]}" && _mssh_complete_rc=0
8427
8468
  (( $#_mssh_complete_dirs )) && _mssh_complete_next_compadd "${_mssh_complete_bare[@]}" -S / - "${_mssh_complete_dirs[@]}" && _mssh_complete_rc=0
8428
- # mssh's history names beside the command's file names, in a word holding a / where the glue split a double quote or zsh keeps
8429
- # none (_mssh_complete_dq: a quoted command, a double-quoted word holding an expansion, after a quote at an =) or after compset -q
8430
- # (a single-quoted command): in the call that adds those names, once a TAB, with its IPREFIX, PREFIX and -p, each less the text
8431
- # typed up to its last / or blank, which those stand for (whole beside them zsh cut the line back: mssh h "/.zzr). They are written
8432
- # for the quote already (_mssh), or after compset -q the remote shell's text, which zsh writes for the quote
8433
- if (( _mssh_complete_file && ! _mssh_complete_filter && ! ${_mssh_complete_texts_beside-1} && ( _mssh_complete_dq || ${_mssh_complete_qcommand:-0} ) )) &&
8434
- [[ ${_mssh_complete_texts_typed-} == */* ]]; then
8435
- _mssh_complete_texts_beside=1
8436
- local _mssh_complete_head=${(M)_mssh_complete_texts_typed##*[/[:blank:]]}
8437
- local -a _mssh_complete_beside _mssh_complete_beside_shown
8469
+ # mssh's history names beside the command's file names, in the first call that adds file names and takes them, once a TAB: in a word
8470
+ # holding a / (_mssh_complete_texts_last). Each less the text typed up to its last / or blank, which the call's IPREFIX, PREFIX and -p
8471
+ # stand for, part by part. zsh writes a directory's / only where the names left are equal in every field, cut the line back beside
8472
+ # them where a name went in whole (mssh h "/.zzr), and wrote a start the history name lacks in a call of its own with a matcher of its
8473
+ # own (_mssh_complete_add_texts after). So a directory part goes in as the call's own directory where the call offers it, the same
8474
+ # name, one that is none here with a / of its own, and the last part with the call's IPREFIX, PREFIX and -p, as 6.47 put the rest.
8475
+ # A directory here that the call does not offer, a second name for it, stopped TAB before its /: there the rest goes in whole.
8476
+ # They are written for the quote already (_mssh), or after compset -q the remote shell's text; a command typed as words has them as
8477
+ # its names are, which start with the text typed as this shell reads it, and quoted here
8478
+ if (( _mssh_complete_file && ! _mssh_complete_filter && $#_mssh_complete_in && ${_mssh_complete_delegating:-0} && ! ${_mssh_complete_texts_beside-1} )) &&
8479
+ [[ -z ${_mssh_complete_lead-} || _mssh_complete_dq -eq 1 || ${_mssh_complete_qcommand:-0} -eq 1 ]] &&
8480
+ [[ ${_mssh_complete_texts_last-} == */* ]]; then
8481
+ local _mssh_complete_head=${(M)_mssh_complete_texts_typed##*[/[:blank:]]} _mssh_complete_headread _mssh_complete_rest
8482
+ local -a _mssh_complete_beside _mssh_complete_beside_shown _mssh_complete_here _mssh_complete_there
8483
+ local -i _mssh_complete_raw=0 _mssh_complete_part
8484
+ (( _mssh_complete_dq || ${_mssh_complete_qcommand:-0} )) || _mssh_complete_raw=1
8485
+ _mssh_complete_headread=$_mssh_complete_head
8486
+ (( _mssh_complete_raw )) && _mssh_complete_headread=${(Q)_mssh_complete_head}
8438
8487
  for (( _mssh_complete_index = 1; _mssh_complete_index <= $#_mssh_complete_texts; _mssh_complete_index++ )); do
8439
- [[ $_mssh_complete_texts[_mssh_complete_index] == "$_mssh_complete_head"?* ]] || continue
8440
- _mssh_complete_word=${_mssh_complete_texts[_mssh_complete_index]#"$_mssh_complete_head"}
8488
+ [[ $_mssh_complete_texts[_mssh_complete_index] == "$_mssh_complete_headread"?* ]] || continue
8489
+ _mssh_complete_rest=${_mssh_complete_texts[_mssh_complete_index]#"$_mssh_complete_headread"}
8490
+ _mssh_complete_word=$_mssh_complete_rest
8491
+ _mssh_complete_part=0
8492
+ if [[ $_mssh_complete_rest == [^/]##/* ]]; then
8493
+ _mssh_complete_value=${_mssh_complete_rest%%/*}
8494
+ if [[ $_mssh_complete_value == [[:alnum:]_.-]## && -d $_mssh_complete_prefix$_mssh_complete_value ]]; then
8495
+ # (a directory here: where the call offers it, with no descriptions to keep in step (-d), the call's own name; else the rest
8496
+ # whole, as 6.47 put it, a second name for the directory stopping TAB before its /)
8497
+ if (( ! _mssh_complete_shown_at && ${_mssh_complete_in[(Ie)$_mssh_complete_value]} )); then
8498
+ (( ${_mssh_complete_here[(Ie)$_mssh_complete_value]} )) || _mssh_complete_here+=("$_mssh_complete_value")
8499
+ continue
8500
+ fi
8501
+ else
8502
+ _mssh_complete_word=$_mssh_complete_value
8503
+ _mssh_complete_part=1
8504
+ fi
8505
+ fi
8506
+ if (( _mssh_complete_raw )); then
8507
+ _mssh_complete_quote_in "$_mssh_complete_word"
8508
+ _mssh_complete_word=$_mssh_complete_inq
8509
+ fi
8441
8510
  (( _mssh_complete_ticked )) && _mssh_complete_tick written "$_mssh_complete_word"
8442
- _mssh_complete_beside+=("$_mssh_complete_word")
8443
- _mssh_complete_beside_shown+=("$_mssh_complete_listed[_mssh_complete_index]")
8511
+ if (( _mssh_complete_part )); then
8512
+ (( ${_mssh_complete_there[(Ie)$_mssh_complete_word]} )) || _mssh_complete_there+=("$_mssh_complete_word")
8513
+ else
8514
+ _mssh_complete_beside+=("$_mssh_complete_word")
8515
+ _mssh_complete_beside_shown+=("$_mssh_complete_listed[_mssh_complete_index]")
8516
+ fi
8444
8517
  done
8445
- (( $#_mssh_complete_beside )) && _mssh_complete_next_compadd "${_mssh_complete_bare[@]}" -Q "${_mssh_complete_closing_opts[@]}" -l -d _mssh_complete_beside_shown - "${_mssh_complete_beside[@]}" && _mssh_complete_rc=0
8518
+ # (taken where zsh took them as matches, a directory the same as the command's too: a call whose PREFIX they do not match, compadd -f
8519
+ # zzdir for zzdir/zz, leaves them to the next one, or to the call of their own)
8520
+ (( $#_mssh_complete_beside )) && _mssh_complete_next_compadd "${_mssh_complete_bare[@]}" -Q "${_mssh_complete_closing_opts[@]}" -l -d _mssh_complete_beside_shown - "${_mssh_complete_beside[@]}" && _mssh_complete_took=1
8521
+ (( $#_mssh_complete_here )) && _mssh_complete_next_compadd "${_mssh_complete_opts[@]}" - "${_mssh_complete_here[@]}" && _mssh_complete_took=1
8522
+ (( $#_mssh_complete_there )) && _mssh_complete_next_compadd "${_mssh_complete_bare[@]}" -Q -qS / - "${_mssh_complete_there[@]}" && _mssh_complete_took=1
8523
+ if (( _mssh_complete_took )); then
8524
+ _mssh_complete_texts_beside=1
8525
+ _mssh_complete_rc=0
8526
+ fi
8446
8527
  fi
8447
8528
  return $_mssh_complete_rc
8448
8529
  }
8449
8530
 
8531
+ _mssh_complete_keep_head() {
8532
+ # comppostfuncs, after the completion system has decided what goes in and applied the menu styles (_mssh registers it with the
8533
+ # line it is for, which the completion alone knows): nothing goes in where the start all the matches share would take text typed off
8534
+ # the line. zsh works that start out from each match's whole line, its quote and IPREFIX in, cut at the anchors of its call's
8535
+ # matcher, and drops what calls with other matchers or prefixes do not pair: the words typed before the word at the cursor (mssh h
8536
+ # "df /etc - became mssh h "df ), or the opening quote (a call with a matcher, then one without: mssh h "zzc /etc --col became mssh h
8537
+ # zzc /etc --col). Stock zsh does both, with no mssh. Only on zsh 5.3 and later, which start the menu themselves at the next TAB
8538
+ # (before, the line stayed); only where no menu is to come or zsh shows the list (else zsh drops its track of the TAB, and the next
8539
+ # one started nothing, for good); never for a pattern glob_complete replaces (compstate[pattern_match]). Only for its own line: a
8540
+ # Ctrl-C can leave it registered (zsh 5.5.1 to 5.9)
8541
+ emulate -L zsh
8542
+ if [[ $compstate[insert] == *unambiguous* && -n ${_mssh_complete_kept_head-} && $CURSOR:$BUFFER == ${_mssh_complete_kept_line-} ]] && (( compstate[nmatches] > 1 )) &&
8543
+ [[ $compstate[insert] != automenu* || $compstate[list] == (list|autolist|ambiguous)* ]] &&
8544
+ [[ -z $compstate[pattern_match] && $ZSH_VERSION != (4.*|5.[0-2](|.*)) ]] &&
8545
+ [[ $compstate[unambiguous] != "$_mssh_complete_kept_head"* || $_mssh_complete_kept_head$_mssh_complete_kept_word == "$compstate[unambiguous]"?* ]]; then
8546
+ compstate[insert]=
8547
+ fi
8548
+ unset _mssh_complete_kept_head _mssh_complete_kept_word _mssh_complete_kept_line
8549
+ }
8550
+
8450
8551
  _mssh_complete_banged() {
8451
8552
  # _mssh_complete_inq of _mssh_complete_quote_in, written for a double quote, with each ! outside it: "zz"\!"x". zsh writes it \!
8452
8553
  # (bang_hist), whose backslash stays inside $( ) (zsh reads the text in it again later, with no history), and a plain one is a
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: multiSSH3
3
- Version: 6.49
3
+ Version: 6.50
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
@@ -1416,6 +1416,17 @@ __DEBUG_MODE = False
1416
1416
 
1417
1417
  > `__DEBUG_MODE` is used to control whether to print host thread execution debug information to its stderr.
1418
1418
 
1419
+ ## Upgrading to 6.50 from 6.49
1420
+
1421
+ Run `mssh --completion install` again (zsh): the fixes below are in the new glue. What you may notice:
1422
+
1423
+ - Fix (zsh): TAB in a directory no longer writes a start that a history name further down lacks: with `zzdir/zzlocal` here and `cat zzdir/sub/zzremote` in history, `mssh h cat zzdir/<TAB>` stays at `zzdir/` (6.49: `zzdir/zz`), and `mssh h cat zzdir/s<TAB>` gives `zzdir/sub/zzremote`.
1424
+ - Fix (zsh): in a quoted command, a `/` in an earlier word no longer keeps history names out: `mssh h "ls /etc --col<TAB>` offers `--colzz` from history beside `ls`'s `--color=`.
1425
+ - Fix (zsh 5.3 and later): in a quoted command, TAB keeps the quote and the words typed that zsh itself would drop, where zsh shows its list, and the next TAB picks from it: `mssh h "df /etc -<TAB><TAB>` gives `mssh h "df /etc --all` (6.49 on zsh 5.4 to 5.9.0: `mssh h "df `).
1426
+ - Fix (zsh 5.0.2): one TAB that passes tens of thousands of plain names, with a command typed as words or in a single-quoted command, outside backticks, takes 1.2 to 2 s at 40,000 names (6.49: 16 to 19 s).
1427
+ - Change (zsh): with bang_hist on, a name holding `!` is not offered in a double quote the remote command opens in a quoted command (`mssh h "cat \"zz<TAB>`); 6.49 wrote `\"zz\\\!x\"` for it, which the remote shell got as `zz\!x`.
1428
+ - Known (zsh): ten entries deferred to 6.51 in [limitations](docs/limitations.md), among them a history name beside a directory that still stops TAB before its `/`, and zsh 5.0.2's TAB time with tens of thousands of names in a double-quoted command.
1429
+
1419
1430
  ## Upgrading to 6.49 from 6.48
1420
1431
 
1421
1432
  Run `mssh --completion install` again (bash): the fixes below are in the new glue. What you may notice:
@@ -42,10 +42,10 @@ from itertools import count, product
42
42
  from pprint import pformat
43
43
 
44
44
 
45
- version = '6.49'
45
+ version = '6.50'
46
46
  VERSION = version
47
47
  __version__ = version
48
- COMMIT_DATE = '2026-11-25'
48
+ COMMIT_DATE = '2026-11-28'
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
@@ -78,10 +78,10 @@ GNU_TOOLS = pytest.mark.skipif(not _gnu_userland(), reason="this machine's ls, c
78
78
  # /etc/hostname and /etc/os-release (macOS: no user bin, root is /var/root, /etc has hosts and no os-release)
79
79
  LINUX_FILES = pytest.mark.skipif(not sys.platform.startswith('linux'), reason="the row names the users and files of a Linux system")
80
80
 
81
- def zsh_version():
82
- '''zsh's version as (major, minor).'''
81
+ def zsh_version(parts=2):
82
+ '''zsh's version as (major, minor), or with parts=3 (major, minor, patch) for a row that differs between 5.9 and 5.9.1.'''
83
83
  output = subprocess.run([require_shell('zsh'), '-fc', 'print -r -- $ZSH_VERSION'], stdout=subprocess.PIPE, timeout=30).stdout
84
- return tuple(int(part) for part in re.findall(r'\d+', output.decode('ascii', 'replace'))[:2])
84
+ return tuple(int(part) for part in re.findall(r'\d+', output.decode('ascii', 'replace'))[:parts])
85
85
 
86
86
  def require_zsh_5_3():
87
87
  '''Skip the test before zsh 5.3: the glue's own grey text and warnings are not set up there.'''