注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。
启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
| #Recursively Remove Empty Directories | |
| import os | |
| for root, dirs, files in os.walk(path, topdown=False): | |
| if not files and not dirs: | |
| os.rmdir(root) | |
| #Recursively Remove Empty Directories, During do something like os.remove(file) |
| from bs4 import BeautifulSoup | |
| # remove all attributes | |
| def _remove_all_attrs(soup): | |
| for tag in soup.find_all(True): | |
| tag.attrs = {} | |
| return soup | |
| # remove all attributes except some tags | |
| def _remove_all_attrs_except(soup): |