zsh は短いホスト名の代わりに完全なホスト名を完成させます。

zsh は短いホスト名の代わりに完全なホスト名を完成させます。

私の中には~/.ssh/config私がいます。

Host students
    HostName students.foo.edu.pl
    User bar

その後、試行が完了するとssh stuzshはstudents.foo.edu.pl代わりに提案しますstudents

一方、IPアドレスを使用すると、オートコンプリートは正常に機能します。

Host knl
    HostName xxx.xxx.xxx.xxx
    User usrxxx
    Port 7777

なぜ?どうすれば解決できますか?私の関連部分.zshrc(プロンプトと記録構成を省略)

setopt nomatch
bindkey -e

#Completion
autoload -Uz compinit && compinit

#Needed for colorful prompts
autoload -U colors && colors
setopt promptsubst
setopt HIST_IGNORE_SPACE

#Antigen
source /usr/share/zsh/scripts/antigen/antigen.zsh
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle olivierverdier/zsh-git-prompt

どちらのホストも定義されていません。/etc/hosts

ベストアンサー1

~/.ssh/known_hostsファイル内のホストが見つかりました。テストのためにその行を削除してください~/.ssh/known_hosts

おすすめ記事