Terminal
系列 - How-to-Term
目录
1 zsh
在 ~/.bashrc
中添加以下配置,
## for history
export HISTTIMEFORMAT="%d/%m/%y %T "
shopt -s histappend
export PROMPT_COMMAND="history -a; history -n"
## for tmux
alias tn='tmux new -s'
alias tl='tmux ls'
alias td='tmux detach'
alias ta='tmux attach -t'
alias tk='tmux kill-session -t'
然后就可以直接使用,
tnew 新的终端会话名
ta 终端会话名
直接关闭终端也会保持在后台运行,通常使用快捷键,注意不要使用 Ctrl C
,否则会直接退出!!!