Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sunlei/zsh-ssh
Better host completion for ssh in Zsh.
https://github.com/sunlei/zsh-ssh
completion fzf shell ssh zsh zsh-completion zsh-plugin
Last synced: 2 months ago
JSON representation
Better host completion for ssh in Zsh.
- Host: GitHub
- URL: https://github.com/sunlei/zsh-ssh
- Owner: sunlei
- License: mit
- Created: 2020-12-27T17:05:45.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-31T05:25:24.000Z (3 months ago)
- Last Synced: 2024-10-31T06:20:43.887Z (3 months ago)
- Topics: completion, fzf, shell, ssh, zsh, zsh-completion, zsh-plugin
- Language: Shell
- Homepage:
- Size: 34.2 KB
- Stars: 136
- Watchers: 2
- Forks: 30
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zsh-ssh
Better host completion for ssh in Zsh.
[![asciicast](https://asciinema.org/a/381405.svg)](https://asciinema.org/a/381405)
- [zsh-ssh](#zsh-ssh)
- [Installation](#installation)
- [Zinit](#zinit)
- [Antigen](#antigen)
- [Oh My Zsh](#oh-my-zsh)
- [Sheldon](#sheldon)
- [Manual (Git Clone)](#manual-git-clone)
- [Usage](#usage)
- [SSH Config Example](#ssh-config-example)## Installation
Make sure you have [fzf](https://github.com/junegunn/fzf) installed.
### Zinit
```shell
zinit light sunlei/zsh-ssh
```### Antigen
```shell
antigen bundle sunlei/zsh-ssh
```### Oh My Zsh
1. Clone this repository into `$ZSH_CUSTOM/plugins` (by default `~/.oh-my-zsh/custom/plugins`)
```shell
git clone https://github.com/sunlei/zsh-ssh ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-ssh
```2. Add the plugin to the list of plugins for Oh My Zsh to load (inside `~/.zshrc`):
```shell
plugins=(zsh-ssh $plugins)
```3. Start a new terminal session.
### Sheldon
1. Add this config to `~/.config/sheldon/plugins.toml`
```toml
[plugins.zsh-ssh]
github = 'sunlei/zsh-ssh'
```2. Run `sheldon lock` to install the plugin.
3. Start a new terminal session.
### Manual (Git Clone)
1. Clone this repository somewhere on your machine. For example: `~/.zsh/zsh-ssh`.
```shell
git clone https://github.com/sunlei/zsh-ssh ~/.zsh/zsh-ssh
```2. Add the following to your `.zshrc`:
```shell
source ~/.zsh/zsh-ssh/zsh-ssh.zsh
```3. Start a new terminal session.
## Usage
Just press Tab after `ssh` command as usual.
### SSH Config Example
You can use `#_Desc` to set description.
~/.ssh/config
```text
Host Bastion-Host
Hostname 1.1.1.1
User sunleiHost Development-Host
Hostname 2.2.2.2
IdentityFile ~/.ssh/development-host
#_Desc For Development
```