Skip to content

Commit 3de2c22

Browse files
author
YuJianjian
committed
split function into a file
1 parent 7cc0ec5 commit 3de2c22

File tree

3 files changed

+46
-73
lines changed

3 files changed

+46
-73
lines changed

iterm2-ssh-plugin/ReadMe.md

Lines changed: 0 additions & 73 deletions
This file was deleted.

iterm2-ssh/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Iterm2-ssh
2+
for mac iterm2
3+
auto re-color & re-name tab when ssh to a remote server
4+
aviod to mistake operations on some important servers
5+
6+
## Steps
7+
#### 1. Config your host
8+
update ~/.ssh/config for hostname alias and priority identified
9+
10+
```bash
11+
Host d01
12+
HostName 192.168.100.11
13+
Port 22
14+
User root
15+
IdentityFile ~/data/keys/mykey
16+
17+
Host dev-n01
18+
HostName 172.16.30.101
19+
Port 22
20+
User root
21+
IdentityFile ~/data/keys/mykey
22+
```
23+
24+
#### 2. Enable the plugin
25+
26+
##### Without `oh-my-zsh`:
27+
put `iterm2-ssh.plugin.zsh` in any place like `~/.plugins`,
28+
append fllowing line in your `~/.zshrc`:
29+
```sh
30+
source ~/.plugins/iterm2-ssh.plugin.zsh
31+
```
32+
33+
##### With `oh-my-zsh`:
34+
put the plugin file under `~/.oh-my-zsh/custome/plugins/iterm2-ssh/`,
35+
and append __iterm2-ssh__ in the constant `plugins` defined in `~/.zshrc`:
36+
```sh
37+
...
38+
plugins=(git iterm2-ssh)
39+
...
40+
```
41+
42+
#### 4. Restart __zsh__
43+
44+
```sh
45+
exec $SHELL
46+
```

0 commit comments

Comments
 (0)