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

更多配置参考博客

参考文章

相关推荐
ChineHe21 小时前
Gin框架入门篇002_第一个Gin服务
macos·xcode·gin
Roc.Chang21 小时前
解决 macOS 26.1 The application “xxxx” can’t be opened. 问题
macos
赶路人儿1 天前
从intel mac迁移到M3后软件的兼容性
macos
颜淡慕潇1 天前
Podman 从0到1使用教程(macOS 系统):安装 MySQL、Redis 容器
mysql·macos·podman
Niap.pr1 天前
Macos下访问树莓派系统(ext4)
macos
芳草萋萋鹦鹉洲哦1 天前
【mac】解决Apple无法验证“fsevents.node”是否包含可能危害Mac安全或泄漏隐私的恶意软件
安全·macos
aini_lovee1 天前
寻找 MAC 协议的 MATLAB 仿真
开发语言·macos·matlab
2501_915106322 天前
最新版本iOS系统设备管理功能全面指南
android·macos·ios·小程序·uni-app·cocoa·iphone
2501_915918412 天前
iOS 性能监控 运行时指标与系统行为的多工具协同方案
android·macos·ios·小程序·uni-app·cocoa·iphone
TheNextByte12 天前
适用于Windows和Mac电脑的Android文件传输工具
windows·macos·电脑