目录

高效的命令行

使用命令行工作的一个总结。

zsh

https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
ZSH_THEME="ys"                # 主题推荐使用 ys
plugins=(
  git
  zsh-autosuggestions         # 历史命令推荐
  zsh-syntax-highlighting     # 命令高亮
)

git

首先配置一波~/.gitconfig:

[user]
    email = 1162097842@qq.com
    name = codekissyoung
[push]
    default = simple
[core]
    quotepath = false
    editor = vim
[alias]
    lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
    co = checkout
    br = branch
    ci = commit
    st = status

把下句加到/etc/profile里:

export LESSCHARSET=utf-8

tmux

$ sudo apt-get install tmux         # 安装
$ tmux attach-session -t link       # 选择 tmux
$ tmux ls                           # 显示已有 tmux 会话
$ tmux new-session -s link          # 新建 tmux
# 在tmux session里面
$ Ctrl b d                          # 返回主 shell
$ Ctrl b %                          # 纵向分割窗口
$ Ctrl b 方向健                      # 进入该窗口
$ Ctrl b "                          # 横向分割窗口
$ exit                              # 退出当前 tmux session