Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.
0 votes
in vifm by
edited by

Как лучше сделать, чтобы показывались какие-нибудь описания файлов и каталогов (в первую очередь — в панели рядом с именем)?

Например, для BBS были файлы files.bbs, но не помню, что там делали с пробелами. для 4DOS и descript.ion. Можно и из sidecar файлов (особенно если нельзя прочитать заранее сразу для всех). Например, yt-dlp может записывать некоторые данные в файл .desktop.

1 Answer

0 votes
by

Are you asking how to implement it in Lua? If so, there isn't much options. After creating a handler for column view or status line you need code for:
1. Finding description file
2. Parsing that file
3. Caching of results (full path -> description or marker for its absence)

If description file has multiple entries, cache all of them on the first run. Then handler will have to look up full path of the current file in the dictionary.

At the moment automatic invalidation of cache entries when file with descriptions changes won't be nice (need to call external command to get modification time).

...