iTerm2html
iTerm一个为Mac OS X编写的,功能齐全的终端仿真程序;目标是在为用户提供OS X下最佳的命令行体验,iTerm 2有不少可以提高效率的实用功能。好比说窗口分割、热键窗口、智能搜索、自动完成、快速复制等等,其余功能可查看官网的Features页。git
Term2的安装与配置github
brew cask install iTerm2
安装(推荐)配置环境变量
vim
Oh My Zsh的安装bash
Oh My Zsh是对主题的进一步扩展,地址:https://github.com/robbyrussell/oh-my-zshcurl
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
$ chsh -s /bin/zsh
ZSH_THEME="agnoster"
更改用户名url
若是是item2 + oh-my-zsh +
agnoster主题组合,cd到 ~/.oh-my-zsh/themes/
而后 vim agnoster.zsh-theme
,找到以下代码spa
# Context: user@hostname (who am I and where am I) prompt_context() { if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then # 修改以下代码,标灰色的地方能够自定义 # prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m" prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@Mac" fi }
iTerm2 快捷命令命令行
命令 | 说明 |
---|---|
command + t | 新建标签 |
command + w | 关闭标签 |
command + 数字 command + 左右方向键 | 切换标签 |
command + enter | 切换全屏 |
command + f | 查找 |
command + d | 垂直分屏 |
command + shift + d | 水平分屏 |
command + option + 方向键 command + [ 或 command + ] | 切换屏幕 |
command + ; | 查看历史命令 |
command + shift + h | 查看剪贴板历史 |
ctrl + u | 清除当前行 |
ctrl + l | 清屏 |
ctrl + a | 到行首 |
ctrl + e | 到行尾 |
ctrl + f/b | 前进后退 |
ctrl + p | 上一条命令 |
ctrl + r | 搜索命令历史 |