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

更多配置参考博客

参考文章

相关推荐
Cosmoshhhyyy3 小时前
mac环境下安装git并配置密钥等
git·macos
肥肥呀呀呀9 小时前
mac 安卓模拟器 blueStacks
macos
csdn_aspnet9 小时前
如何在 MacOS 上安装 SQL Server
macos·sqlserver
共享家95271 天前
linux-数据链路层
linux·网络·macos
CZIDC2 天前
MacOS字体看起来比在 Windows 上更好?
macos
Cosmoshhhyyy2 天前
linux远程部署dify和mac本地部署dify
linux·运维·macos
行星0082 天前
mac 通过homebrew 安装和使用nvm
macos·npm·node.js
2501_928094652 天前
Mac电脑录屏工具 Omi录屏专家(Mac中文)
macos·mac·录屏工具·omi
森之鸟3 天前
Mac chrome浏览器下载DevEco Studio 6.0.0 Beta2失败
前端·chrome·macos