mac cli文件管理器

背景

最近研究了一下在控制台查看文件的插件ranger, 官方的解释是:一个cli下的文件管理器。觉得效果也很酷炫,所以在此展示一下。

安装

shell 复制代码
brew install ranger

配置生成

建议第一次使用的时候使用

shell 复制代码
ranger --copy-config=all

将会在~/.config/ranger目录输出以下文件

bash 复制代码
commands.py             # 与以下命令一起启动的命令 :
commands_full.py        # 全套命令
rc.conf                 # 配置和绑定
rifle.conf              # 文件关联(用于打开文件的程序)
scope.sh                # 负责各种文件预览

命令行执行ranger即可

设置

以下配置都是修改 rc.conf

预览图片

shell 复制代码
set preview_images true
set preview_images_method iterm2

安装图标

shell 复制代码
brew install font-hack-nerd-font
git clone https://github.com/cdump/ranger-devicons2 ~/.config/ranger/plugins/devicons2
Add/change `default_linemode devicons2` in your `~/.config/ranger/rc.conf`

字体安装尝试了很多次,还是乱码,最终放弃了

显示行号

shell 复制代码
set line_numbers  true

设置宽度

shell 复制代码
set column_ratios  2,3,5

更多配置参考博客

参考文章

相关推荐
星辰即远方6 小时前
天气预报总结
macos·ios·objective-c·cocoa
xixiaoyunya7 小时前
Mac远程访问新范式:基于80KM穿云箭的内网穿透技术实践
macos
秋雨梧桐叶落莳8 小时前
计算器仿写总结
学习·macos·ios·objective-c·cocoa
寒水馨17 小时前
macOS下载、安装uv-0.12.0(附安装包uv-aarch64-apple-darwin.tar.gz)
python·macos·rust·项目管理·包管理器·astral·pip替代
寒水馨18 小时前
macOS下载、安装protobuf-v35.1(附安装包protoc-35.1-osx-universal_binary.zip)
macos·google·grpc·序列化·protobuf·protoc·数据交换
寒水馨18 小时前
macOS下载、安装ripgrep-15.2.0(附安装包ripgrep-15.2.0-aarch64-apple-darwin.tar.gz)
macos·正则表达式·rust·ripgrep·rg·命令行搜索·代码搜索
起司喵喵2 天前
Flutter-MacOS桌面OS系统|flutter.+window_manager客户端OS模板
flutter·macos·策略模式
代码对我眨眼睛2 天前
macOS Google Chrome 常用快捷键
前端·chrome·macos
啊真真真2 天前
macOS下libnfc ..写卡失败问题及解决方案
macos·策略模式
叶 落2 天前
Mac 通过 Miniconda 安装 Python
python·macos·conda·miniconda