Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-complete broken for SSH hostname tab completions (_hosts_ #4891

Closed
varCharlie opened this issue Feb 29, 2016 · 9 comments
Closed

Auto-complete broken for SSH hostname tab completions (_hosts_ #4891

varCharlie opened this issue Feb 29, 2016 · 9 comments
Labels
Topic: completion Pull Request or issue regarding completion

Comments

@varCharlie
Copy link

_Edit: Sorry, I didn't search. I'm at work so I can't look through these at the moment, but I'm guessing my issue is somewhere in #4345 -- if so, I'll close this issue. If not, please link this issue to that tracker

SSH Auto-Complete Issue

I'm hoping somebody else has encountered this issue as well. Recently, I'm not sure exactly when, the SSH hostname completion broke in Oh My ZSH (for me at least). I've verified that this is related to Oh-My-ZSH and not anything else.

Here's how it seems to happen.

  1. I open up an iTerm window and type:
    % ssh ftp.
  2. I press tab to autocomplete the rest of the hostname.
    At this point, the terminal freezes and I am unable to type.
    The cursor keeps blinking. Everything else still responds.
  3. I press ctrl-c and receive this message:
    Killed by signal in _hosts after 45s
  4. _Once I've killed the signal in hosts, tab completion will work fine...
    At least until I open up a new terminal and go through this again.

Specs:

  • iTerm 2.1.4
  • Mac OSX 10.11.2
  • zsh 5.2
❯❯ cat omz_diagdump_20160229-112219.txt                                      11:22AM
cat omz_diagdump_20160229-112219.txt
oh-my-zsh diagnostic dump

omz_diagdump_20160229-112219.txt

Mon Feb 29 11:22:19 CST 2016
Darwin mac-chapan 15.2.0 Darwin Kernel Version 15.2.0: Fri Nov 13 19:56:56 PST 2015; root:xnu-3248.20.55~2/RELEASE_X86_64 x86_64
OSTYPE=darwin15.0.0
ZSH_VERSION=5.2
User: charlespantoga
umask: 022

And my .zshrc:

# Oh-My-ZSH Location:
export ZSH=~/.oh-my-zsh

# THEME
ZSH_THEME='bluelight'

# ZSH Update Settings
DISABLE_AUTO_UPDATE="false"
export UPDATE_ZSH_DAYS=3

# Terminal Settings:
DISABLE_LS_COLORS="false"
DISABLE_AUTO_TITLE="false"

# Completion/Correction:
ENABLE_CORRECTION="true"
COMPLETION_WAITING_DOTS="true"
HYPHEN_INSENSITIVE="true"
CASE_SENSITIVE="false"

# set for faster shell: DISABLE_UNTRACKED_FILES_DIRTY="true"

# Hist Stamps:
HIST_STAMPS="yyyy-mm-dd"

# ZSH Custom Folder:
# -- Not setting one uses default ~/.oh-my-zsh/custom
# -- this behavior is okay for us

# Plugins:
plugins=(
  vi-mode
  git
  brew
)

# Paths:
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
#PATH="$PATH:/opt/X11/bin:/usr/local/munki"

# Source Includes:
source $ZSH/oh-my-zsh.sh

# Use vi instead of emacs:
#set -o vi
# -- we've already set vi-mode

# Force use of `cd` to change dirs:
unsetopt autocd

# Use bash-like globbing
setopt nonomatch

# Include aliases:
if [ -e ~/.aliases ]; then
  source ~/.aliases
fi
# Include functions:
if [ -e ~/.funcs ]; then
  source ~/.funcs
fi
# Include variables:
if [ -e ~/.vars ]; then # currently no variables are set... leave anyway
  source ~/.vars
fi

# Load work specific shell options
if [ -f ~/.work ]; then
    source ~/.work
fi
@varCharlie
Copy link
Author

I should point out, this doesn't actually happen on my personal laptop. Just my work laptop.

@mcornella mcornella added the Topic: completion Pull Request or issue regarding completion label Mar 30, 2016
@golimpio
Copy link

It works on my Linux, but fails on my Mac:

  • zsh 5.2 (x86_64-apple-darwin15.0.0)
  • iTerm2 Build 2.9.20160324-nightly
  • OS X 10.11.4
  • zgen

@jamestaylr
Copy link

jamestaylr commented Jul 31, 2016

I also get this all the time on both my work and personal machines (~Mac OS X 10.11.6). One is using iTerm2, the other is the regular Terminal.app.

This is a very annoying issue that is so easily reproduced, I'm surprised it hasn't been fixed yet.

@ileodo
Copy link

ileodo commented Aug 9, 2016

it also happens on my Linux workstation when I try to autocomplete the path in NFS/DFS by using double-tab.
@robbyrussell

@varCharlie
Copy link
Author

This issue, compounded with the fact that ZSH array indexing starts at 1, has caused me to migrate back to BASH. It actually wasn't that hard to port the ZSH theme I made for ZSH back to BASH, and I'm working on my own completion now. It's not as good as ZSH completion was, but I'm just as productive now with BASH. Funny how that works out... So in a way, thank you for never solving this issue.

@EugenMayer
Copy link

Yeah this issue is probably one of the most annoying and distracting things with ZSH

@nickma82
Copy link

nickma82 commented Dec 6, 2017

Maybe a part of the globbing issue is mentioned at the zsh-Readme "Incompatibilities between 5.0.8 and 5.3".

@adriannieto-attechnest
Copy link

This is still happening at the moment in latest OSX Ventura (zsh 5.8.1 (x86_64-apple-darwin22.0))

@robbyrussell
Copy link
Member

Hey there, I'm doing a bit of housekeeping on the project. Thanks for raising this issue—we always love a good edge case! 😄

However, it's not gathering much community interest (in that nobody has taken steps to solve+submit a PR), so I'm going to close it for now. Don't let this discourage you! We're all for hearing about the weird things. We can't commit to spending too much time tracking each weird thing down ourselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Topic: completion Pull Request or issue regarding completion
Projects
Archived in project
Development

No branches or pull requests

9 participants