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

更多配置参考博客

参考文章

相关推荐
wangDer_me44 分钟前
将mac电脑变成一个虚拟打印机
macos·电脑
加载力科技11 小时前
Mac 打开 ISO 文件完整教程:3 种方法挂载与解压,挂载失败也能提取文件
macos·命令模式·磁盘工具·mac打开iso·hdiutil·iso解压·mac技巧
Web Security Loop12 小时前
MAC安装最新Burpsuite pro详细步骤教程
web安全·macos·网络安全·安全性测试
Raspberry_Pi_官方账号12 小时前
Raspberry Pi Desktop 全面升级,现已登陆 PC 和 Mac
服务器·网络·macos·树莓派·raspberry pi·raspberrypios
king135987455013 小时前
EmbeddingGemma 2 270M 实测:Mac CPU、PDF/Word、256d 与 FTS5
macos·pdf·word
Patrick在香港21 小时前
同一份脚本,mac 正常 Windows 乱码:open() 默认编码实测(附 3.15 终局)
utf-8·windows·python·macos·跨平台·编码·标准库
DevLoom_1 天前
Mac装NTFS for Mac,不用修改 SIP 安全设置也能正常读写NTFS硬盘
macos·macos 27·mac读写ntfs·ntfs for mac·mac应用
Laurie三省1 天前
现场版却配上录音室版的歌词?聊聊我给开源 Mac 歌词软件写的多源打分算法
算法·macos·go
David@1 天前
Mac中cursor怎么检查更新
macos
Lancker2 天前
没有 Mac 也能上架 iOS:GitHub Actions 全自动构建 + 签名 + TestFlight 送审实录
macos·ios·github