Skip to content

[Bug]: SSH completion for user@host removes the @ #2260

Open
@seefood

Description

@seefood

Expected behavior

ssh root@ser
should complete to
ssh root@server

Current behavior

ssh root@ser
completes to
ssh rootserver

Possible solution

I wish I knew enough about bash completion logic, I would guess it's related to the global definitions of tokenizing set to : but not @ or some such hidden setting.

Context

No response

Steps to reproduce

  • Enable the ssh completion
  • Have some hosts in known_hosts, /etx/hosts, .ssh/config or similar
  • Try to complete ssh/scp/sftp in the format username@servername

Bash-it version

d985e4c on 2023-11-18T14:42:33-07:00

List of enabled plugins, themes and aliases

150---ag.aliases.bash 150---vim.aliases.bash 250---history-search.plugin.bash 250---virtualenv.plugin.bash 350---docker.completion.bash 150---ansible.aliases.bash 250---aws.plugin.bash 250---history-substring-search.plugin.bash 250---xterm.plugin.bash 350---export.completion.bash 150---atom.aliases.bash 250---base.plugin.bash 250---history.plugin.bash 250---z_autoenv.plugin.bash 350---helm.completion.bash 150---bash-it.aliases.bash 250---battery.plugin.bash 250---less-pretty-cat.plugin.bash 325---system.completion.bash 350---kubectl.completion.bash 150---curl.aliases.bash 250---browser.plugin.bash 250---man.plugin.bash 350---awless.completion.bash 350---pip.completion.bash 150---fuck.aliases.bash 250---colors.plugin.bash 250---osx.plugin.bash 350---awscli.completion.bash 350---pip3.completion.bash 150---general.aliases.bash 250---dirs.plugin.bash 250---python.plugin.bash 350---bash-it.completion.bash 350---ssh.completion.bash 150---git.aliases.bash 250---docker-compose.plugin.bash 250---ssh.plugin.bash 350---conda.completion.bash 350---tmux.completion.bash 150---homebrew-cask.aliases.bash 250---docker.plugin.bash 250---sudo.plugin.bash 350---defaults.completion.bash 375---brew.completion.bash 150---homebrew.aliases.bash 250---edit-mode-emacs.plugin.bash 250---thefuck.plugin.bash 350---dirs.completion.bash 375---fzf.plugin.bash 150---kubectl.aliases.bash 250---git.plugin.bash 250---todo.plugin.bash 350---docker-compose.completion.bash 800---aliases.completion.bash

Bash version

5.2.32(1)-release (aarch64-apple-darwin23.4.0)

Operating system and version

Darwin Kernel Version 23.6.0

bash-it doctor output

# How to get: bash-it doctor

Your ~/.bashrc

# Path to the bash it configuration
export BASH_IT="${HOME}/.bash_it"
# Load Bash It
# shellcheck disable=SC1091
[[ -d $BASH_IT ]] && source "$BASH_IT/bash_it.sh"

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions