Skip to content

Instantly share code, notes, and snippets.

@nhthai2005
nhthai2005 / Autocomplete_ssh_scp.md
Last active January 7, 2025 10:17
Autocomplete server names for SSH and SCP for Git Bash

Autocomplete server names for SSH and SCP for Git Bash

For ssh

1. Make a file with name ssh as following content:

_ssh() 
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"