Fli - 一个小巧(18KB)的易读文件列表工具。支持 Rust 的 no_std 和 Libc。
为什么?<p>我只能通过 SSH 访问我的 Raspberry Pi Zero。对我来说,仅仅通过颜色来区分文件类型等信息比较困难,我需要一些更易读、清晰的东西,比如图片、图标或表情符号。因此,我决定构建 fli。由于几乎所有机器上都预装了 ls,fli 作为一个辅助工具的第二个要求是体积小巧。<p>可读性:由于使用了表情符号(而不是文本颜色),可读性很好。<p>体积:由于 Rust 标准库对二进制文件大小的影响很大,因此该项目采用 no_std + libc。<p>当前二进制文件大小:M 系列 Mac 51KB,Raspberry Pi Zero 18KB。<p>显示选项:<p>`fli`:简短(名称和类型)未排序输出 - 直接流,无堆分配<p>`fli -s`:简短(名称和类型)按名称排序的输出 - 使用堆分配<p>`fli -l`:长格式(名称、类型、元数据)未排序输出,固定大小对齐(大小和 n_link 各占 20 个字符) - 直接流,无堆分配<p>`fli -l -s`:长格式(名称、类型、元数据)按名称排序的输出,动态对齐 - 使用堆分配。<p>`fli -l -S`:长格式(名称、类型、元数据)按大小排序的输出,动态对齐 - 使用堆分配。<p>GitHub 仓库:https://github.com/tracyspacy/fli
查看原文
Why?<p>I have access to my raspberry pi zero via ssh only. As for me it is hard to differentiate types of files etc based on colors, I needed something more readable and clear like picture/icon or emoji as I ended up with etc. And I decided to build fli and since ls is obviosly preinstalled on almost any machine, the second requirement for fli as a complimentary tool, is to be tiny.<p>Readability: Nice readability thanks to use of emojis ( and ) instead of text coloring.<p>Size: Since rust std contributes heavily to binary size, this project is no_std + libc<p>Current binary size: M-series Mac 51KB , rpi zero 18KB.<p>Display options:<p>`fli` : short (name and type) not sorted output - direct stream, no heap allocation<p>`fli -s`: short (name and type) sorted by name output - uses heap allocation<p>`fli -l`: long (name, type, metadata ) not sorted output and fixed-sized alignment (20 chars for size and n_link) - direct stream, no heap allocation<p>`fli -l -s`: long (name, type, metadata ) sorted by name output and dynamic alignment - uses heap allocation.<p>`fli -l -S`: long (name, type, metadata ) sorted by size output and dynamic alignment - uses heap allocation.<p>GitHub repo: https://github.com/tracyspacy/fli