Mru-files: related files, session autosave, v0.1.4

I’m happy to announce version 0.1.4 of mru-files. In this release (CHANGELOG for details; initial announcement for reference):

  • related files support: press = in the *mru* buffer to bubble up files “related” (path-wise) to the one under cursor. Or use mru-files-related (or a mapping) to bring up a reshuffled *mru* related to any buffer. You can update the actual history file from *mru*, as before, by pressing “>” (otherwise, the reshuffling is only temporary).
  • session autosave: by default (mru_files_session_autosave = true), the list of open buffers is saved to mru_files_session_file (~/.local/share/kak/mru/mru_files_session.kak) on client exit. Invoke mru-files-session-load from kakrc / manually to restore the session on startup / whenever. As before, sessions can be saved to specific files as well.
  • more functions in the POSIX shell library k9s0ke-shlib, designed to facilitate common operations and avoid subshells / pipes:
    • ..._r4 (“return-for”) versions leave results in _R4_... globals (local-izable)
    • ..._ref versions take one or more outvar names as args
    • str_... versions operate on strings rather than stdin

Edit: changed the annoying <space> mapping to “=

Please enjoy, and report any problems or ideas for improvements!

Note on testing

I’m using t3st — my TAP-based shell testing library aiming for … infinite flexibility with default simplicity (or something). Both shell functions and plugin installation in a clean environment ($HOME mockup) can be tested (see the mru-files test branch). Tests can be run sequentially or in parallel using perl’s prove; t3st can also set up there wrappers (git aliases working from anywhere in the project) to test multiple shells automatically. t3st itself can be used in dash / busybox sh / bash / zsh (with its various emulation modes) / FreeBSD sh / yash / mksh.

1 Like