8
现代化命令行工具之Ubuntu 20.04(qbit)
source link: https://segmentfault.com/a/1190000040522625
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
简易的 shell 脚本:https://github.com/qbit-git/m...
bash modern_cli_ubuntu2004.sh
- 本脚本适用于与有 root/sudo 权限使用
- 本脚本适用于初始化,没做条件判断,不适用于复杂情景
rg 替换 grep
- 编程语言: Rust
- GitHub:https://github.com/BurntSushi...
安装与配置
sudo apt install ripgrep -y # 下面一句是避免与下文介绍的 bat 冲突 sudo sed -i '/\/usr\/.crates2.json/d' /var/lib/dpkg/info/ripgrep.list echo 'alias grep=rg' >> ~/.bashrc
bat 替换 cat
- 编程语言: Rust
- GitHub: https://github.com/sharkdp/bat
安装与配置
sudo apt install bat -y echo 'alias cat=batcat' >> ~/.bashrc
fd 替换 find
- 编程语言: Rust
GitHub: # https://github.com/sharkdp/fd
sudo apt install fd-find -y echo 'alias fd=fdfind' >> ~/.bashrc echo 'alias find="fdfind -H"' >> ~/.bashrc
fzf 命令行模糊匹配
- 编程语言: Go
GitHub: https://github.com/junegunn/fzf
sudo apt install fzf echo 'source /usr/share/doc/fzf/examples/completion.bash' >> ~/.bashrc echo 'source /usr/share/doc/fzf/examples/key-bindings.bash' >> ~/.bashrc
- 编程语言: Python
- GitHub: https://github.com/pypa/pipx
安装与配置
pip3 install pipx echo 'export PATH=$PATH:/home/ubuntu/.local/bin' >> ~/.bashrc
- 编程语言: Python
- GitHub: https://github.com/tldr-pages...
安装与配置
pipx install tldr tldr -u
glances 替换 top
- 编程语言: Python
- GitHub: https://github.com/nicolargo/...
安装与配置
pipx install glances mkdir .config/glances/ cp .local/pipx/venvs/glances/share/doc/glances/glances.conf .config/glances/glances.conf
xonsh 基于 Python 的 shell
- 编程语言: Python
- GitHub: https://github.com/xonsh/xonsh
安装与配置
pipx install xonsh[full] -i https://mirrors.aliyun.com/pypi/simple/ aliases['ll'] = 'ls -al'
本文出自 qbit snap
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK