zsh-workers
 help / color / mirror / code / Atom feed
* ssh completion on Catalina
@ 2019-10-21  7:41 Bruno Bazille
  2019-10-23  9:36 ` dana
  0 siblings, 1 reply; 5+ messages in thread
From: Bruno Bazille @ 2019-10-21  7:41 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 505 bytes --]

Hi

I installed the last macOS version : 10.15
I’m using iTerm2
brew upgrade has been performed

When I want to connect one of my server here below the completion issue :
The server name I want to reach is vmbar (note all my server names start by vm)

%> ssh bar<tab>
==> completion seems blocked

%> <ctrl+c>
Killed by signal in _ssh_hosts after Xs

==> if I write the server name from the beginning
%> ssh vmba<tab>
==> completion works fine

Thanks for your return

Cheers
Bruno

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ssh completion on Catalina
  2019-10-21  7:41 ssh completion on Catalina Bruno Bazille
@ 2019-10-23  9:36 ` dana
  2019-10-31 13:53   ` Bruno Bazille
  0 siblings, 1 reply; 5+ messages in thread
From: dana @ 2019-10-23  9:36 UTC (permalink / raw)
  To: Bruno Bazille; +Cc: zsh-workers

On 21 Oct 2019, at 02:41, Bruno Bazille <bruno@bazille.fr> wrote:
> I installed the last macOS version : 10.15
> I’m using iTerm2
> brew upgrade has been performed

Were you previously on Mojave, and it worked there? Do you know what version
of zsh you were using there, and which one you're using on Catalina? And you
didn't change anything else about your zsh or SSH configuration?

On 21 Oct 2019, at 02:41, Bruno Bazille <bruno@bazille.fr> wrote:
> When I want to connect one of my server here below the completion issue :
> The server name I want to reach is vmbar (note all my server names start by vm)
>
> %> ssh bar<tab>
> ==> completion seems blocked

This will probably be weird because it's getting stuck in a loop, but you can
try this. First, run the following:

  bindkey '^x?' _complete_debug

Then, enter the problematic command to complete like you were doing before,
but instead of pressing Tab, press Ctrl+X followed immediately by ? (question
mark).

After it gets stuck, give it a second or two, then press Ctrl+C again to abort
it. It should dump a trace file, but since you cancelled it you'll have to
find it yourself. Try:

  ls $TMPPREFIX*(.)

Hopefully there'll be a file like zsh1234ssh1. If so, review it for any
sensitive information (since it's SSH hosts it may contain servers/IPs),
censor if necessary, and then attach the file here

dana


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ssh completion on Catalina
  2019-10-23  9:36 ` dana
@ 2019-10-31 13:53   ` Bruno Bazille
  2019-10-31 14:01     ` Bruno Bazille
  0 siblings, 1 reply; 5+ messages in thread
From: Bruno Bazille @ 2019-10-31 13:53 UTC (permalink / raw)
  To: dana; +Cc: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 3399 bytes --]

Hi Dana

I thank you for your quick reply and I apologize for my delay (Vacation period in France)

Previously Mojave was installed, the very last version
Zsh version, no sorry, but I performed a brew upgrade recently
Now, Zsh 5.7.1 is installed
No specific configuration was done.

I agree your analyse : stuck in loop

I performed your recommendations.

ssh bar<Ctrl+x ?>
<Ctrl+C>
I got a file, unfortunalty I’m not able to understand it…
I see the list of server from my .ssh/config.d/hosts
I see sort of loop

Then I tried again and wait longer and… completion works after 4/5 seconds
Same with the traditional <tab>

I removed the bind key (bindkey -r '^x?’)
<tab> works with few seconds delay

What can I bring you as input ?
Strange that the completion spends more time than Mojave env.
I don’t know which programming language is used, but i seems the interpreter is less quicker in this case.

I apply the very last Catalina release (2 day ago), there are a lot of small mistake with Catalina, so I guest each new version will fix these « bugs ».
I perform also a brew upgrade too.
No solved my issue.

So it is not really a problem, but I manage hundreds of servers, the ssh command is my hourly tool…
For instance, I have 45 having « multi »	in their name.

%> ssh multi<tab> takes 8 seconds to complete the real root name of these 45 servers.
<tab> again to have the complete list of them, to select the one I want to connect with right arrow, is again few seconds.

As I tell you in my 1st mail, if I specify the first characters of server name such as in my case ssh vmmulti, the completion is immediate and the next tab is also immediate.
As 90% of the server names start by « vm », now I write these 2 chars in my ssh command to go faster. In Mojave env, no.

Regards,
Bruno


> Le 23 oct. 2019 à 11:36, dana <dana@dana.is> a écrit :
> 
> On 21 Oct 2019, at 02:41, Bruno Bazille <bruno@bazille.fr> wrote:
>> I installed the last macOS version : 10.15
>> I’m using iTerm2
>> brew upgrade has been performed
> 
> Were you previously on Mojave, and it worked there? Do you know what version
> of zsh you were using there, and which one you're using on Catalina? And you
> didn't change anything else about your zsh or SSH configuration?
> 
> On 21 Oct 2019, at 02:41, Bruno Bazille <bruno@bazille.fr> wrote:
>> When I want to connect one of my server here below the completion issue :
>> The server name I want to reach is vmbar (note all my server names start by vm)
>> 
>> %> ssh bar<tab>
>> ==> completion seems blocked
> 
> This will probably be weird because it's getting stuck in a loop, but you can
> try this. First, run the following:
> 
>  bindkey '^x?' _complete_debug
> 
> Then, enter the problematic command to complete like you were doing before,
> but instead of pressing Tab, press Ctrl+X followed immediately by ? (question
> mark).
> 
> After it gets stuck, give it a second or two, then press Ctrl+C again to abort
> it. It should dump a trace file, but since you cancelled it you'll have to
> find it yourself. Try:
> 
>  ls $TMPPREFIX*(.)
> 
> Hopefully there'll be a file like zsh1234ssh1. If so, review it for any
> sensitive information (since it's SSH hosts it may contain servers/IPs),
> censor if necessary, and then attach the file here
> 
> dana
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ssh completion on Catalina
  2019-10-31 13:53   ` Bruno Bazille
@ 2019-10-31 14:01     ` Bruno Bazille
  2019-10-31 23:30       ` dana
  0 siblings, 1 reply; 5+ messages in thread
From: Bruno Bazille @ 2019-10-31 14:01 UTC (permalink / raw)
  To: dana; +Cc: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 4084 bytes --]

Dana,

Just add this :

If I write partial name which doesn’t exist, completion takes 30 seconds before error message :

ssh: Could not resolve hostname dlfgkmd: nodename nor servname provided, or not known

In Mojave env, it seems I received a Bell, and I used backspace to fix the partial name.

Note, today I have 520 servers description in my .ssh/config file

Cheers,
Bruno


> Le 31 oct. 2019 à 14:53, Bruno Bazille <bruno@bazille.fr> a écrit :
> 
> Hi Dana
> 
> I thank you for your quick reply and I apologize for my delay (Vacation period in France)
> 
> Previously Mojave was installed, the very last version
> Zsh version, no sorry, but I performed a brew upgrade recently
> Now, Zsh 5.7.1 is installed
> No specific configuration was done.
> 
> I agree your analyse : stuck in loop
> 
> I performed your recommendations.
> 
> ssh bar<Ctrl+x ?>
> <Ctrl+C>
> I got a file, unfortunalty I’m not able to understand it…
> I see the list of server from my .ssh/config.d/hosts
> I see sort of loop
> 
> Then I tried again and wait longer and… completion works after 4/5 seconds
> Same with the traditional <tab>
> 
> I removed the bind key (bindkey -r '^x?’)
> <tab> works with few seconds delay
> 
> What can I bring you as input ?
> Strange that the completion spends more time than Mojave env.
> I don’t know which programming language is used, but i seems the interpreter is less quicker in this case.
> 
> I apply the very last Catalina release (2 day ago), there are a lot of small mistake with Catalina, so I guest each new version will fix these « bugs ».
> I perform also a brew upgrade too.
> No solved my issue.
> 
> So it is not really a problem, but I manage hundreds of servers, the ssh command is my hourly tool…
> For instance, I have 45 having « multi »	in their name.
> 
> %> ssh multi<tab> takes 8 seconds to complete the real root name of these 45 servers.
> <tab> again to have the complete list of them, to select the one I want to connect with right arrow, is again few seconds.
> 
> As I tell you in my 1st mail, if I specify the first characters of server name such as in my case ssh vmmulti, the completion is immediate and the next tab is also immediate.
> As 90% of the server names start by « vm », now I write these 2 chars in my ssh command to go faster. In Mojave env, no.
> 
> Regards,
> Bruno
> 
> 
>> Le 23 oct. 2019 à 11:36, dana <dana@dana.is <mailto:dana@dana.is>> a écrit :
>> 
>> On 21 Oct 2019, at 02:41, Bruno Bazille <bruno@bazille.fr <mailto:bruno@bazille.fr>> wrote:
>>> I installed the last macOS version : 10.15
>>> I’m using iTerm2
>>> brew upgrade has been performed
>> 
>> Were you previously on Mojave, and it worked there? Do you know what version
>> of zsh you were using there, and which one you're using on Catalina? And you
>> didn't change anything else about your zsh or SSH configuration?
>> 
>> On 21 Oct 2019, at 02:41, Bruno Bazille <bruno@bazille.fr <mailto:bruno@bazille.fr>> wrote:
>>> When I want to connect one of my server here below the completion issue :
>>> The server name I want to reach is vmbar (note all my server names start by vm)
>>> 
>>> %> ssh bar<tab>
>>> ==> completion seems blocked
>> 
>> This will probably be weird because it's getting stuck in a loop, but you can
>> try this. First, run the following:
>> 
>>  bindkey '^x?' _complete_debug
>> 
>> Then, enter the problematic command to complete like you were doing before,
>> but instead of pressing Tab, press Ctrl+X followed immediately by ? (question
>> mark).
>> 
>> After it gets stuck, give it a second or two, then press Ctrl+C again to abort
>> it. It should dump a trace file, but since you cancelled it you'll have to
>> find it yourself. Try:
>> 
>>  ls $TMPPREFIX*(.)
>> 
>> Hopefully there'll be a file like zsh1234ssh1. If so, review it for any
>> sensitive information (since it's SSH hosts it may contain servers/IPs),
>> censor if necessary, and then attach the file here
>> 
>> dana
>> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ssh completion on Catalina
  2019-10-31 14:01     ` Bruno Bazille
@ 2019-10-31 23:30       ` dana
  0 siblings, 0 replies; 5+ messages in thread
From: dana @ 2019-10-31 23:30 UTC (permalink / raw)
  To: Bruno Bazille; +Cc: zsh-workers

On 31 Oct 2019, at 09:01, Bruno Bazille <bruno@bazille.fr> wrote:
> If I write partial name which doesn’t exist, completion takes 30 seconds
> before error message :
>
> ssh: Could not resolve hostname dlfgkmd: nodename nor servname provided, or
> not known

I don't think ssh actually gets called when just parsing the hosts, so maybe
that's from _remote_files or something? But i still wouldn't expect it to
print out garbage like that.

On 31 Oct 2019, at 09:01, Bruno Bazille <bruno@bazille.fr> wrote:
> Note, today I have 520 servers description in my .ssh/config file

All of the parsing happens in a shell function, so it's possible that with a
complex enough configuration file it might take a long time... but it's hard
to say. I wouldn't expect it to get too slow until it hit like many thousands
of lines. And even then i'm not sure why it would differ between Mojave and
Catalina.

It would be ideal if you could attach the trace file you got from
_complete_debug. You can xxx out the IP addresses, host names, and user names,
if you need to. It's hard to know what it's really doing otherwise. At least,
i don't have any ideas myself.

dana


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-31 23:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-21  7:41 ssh completion on Catalina Bruno Bazille
2019-10-23  9:36 ` dana
2019-10-31 13:53   ` Bruno Bazille
2019-10-31 14:01     ` Bruno Bazille
2019-10-31 23:30       ` dana

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).