Content Table

Shuttle

使用 Shuttle 来管理命令的快捷方式,例如 SSH 的登录等。

主页: http://fitztrev.github.io/shuttle/

支持的终端程序

  • 默认情况下,使用系统自带的终端 Terminal.app
  • 切换到 iTerm2,edit ~/.shuttle.json,并且改变 terminal 的属性

配置

配置位于 <User>/.shuttle
主要是配置 hosts:

  • cmd: 命令
  • name: 显示在 Shuttle 中的标题,点击它后执行 cmd 里的命令
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
"_comments": [
"Valid terminals include: 'Terminal.app' or 'iTerm'",
"In the editor value change 'default' to 'nano', 'vi', or another terminal based editor.",
"Hosts will also be read from your ~/.ssh/config or /etc/ssh_config file, if available",
"For more information on how to configure, please see http://fitztrev.github.io/shuttle/"
],
"editor": "default",
"launch_at_login": false,
"terminal": "Terminal.app",
"iTerm_version": "nightly",
"default_theme": "default_theme",
"open_in": "tab",
"show_ssh_config_hosts": false,
"ssh_config_ignore_hosts": [],
"ssh_config_ignore_keywords": [],

"hosts": [{
"name": "Server 1",
"cmd": "echo ' 登陆 XXX'; ssh root@219.146.255.179"
}, {
"name": "Server 2",
"cmd": "echo ' 登陆 YYY'; ssh root@219.146.255.179"
}]
}

支持 iTerm

在 iTerm 中标签页打开,需要:

  • terminal 修改为 iTerm
  • default_theme 修改为 Default
  • make sure you have a profile called Default and ensure that you dont have the setting “Don’t Open Any Windows” turned on,参考 Iterm3 and Shuttle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
"_comments": [
"Valid terminals include: 'Terminal.app' or 'iTerm'",
"In the editor value change 'default' to 'nano', 'vi', or another terminal based editor.",
"Hosts will also be read from your ~/.ssh/config or /etc/ssh_config file, if available",
"For more information on how to configure, please see http://fitztrev.github.io/shuttle/"
],
"editor": "default",
"launch_at_login": false,
"terminal": "iTerm",
"iTerm_version": "nightly",
"default_theme": "Default",
"open_in": "tab",
"show_ssh_config_hosts": false,
"ssh_config_ignore_hosts": [],
"ssh_config_ignore_keywords": [],
"hosts": [
{
"name": "test",
"cmd": "echo Goo"
}
]
}