Skip to content

v1.7.0 — the listing answers back

Choose a tag to compare

@danielrosehill danielrosehill released this 30 Jul 12:50
· 14 commits to master since this release

First packaged release. ls, in directories you nominate, becomes a
recency-grouped listing of your repositories, numbered newest-first — and the
listing ends by asking which one you want.

Install

sudo apt install ./lsrecent_1.7.0_all.deb
lsrecent shell-install     # once per user account

Then open a new terminal, and in any directory you want the grouped view:

lsrecent add               # or: lsrecent gui

The package does not edit anyone's ~/.bashrc — a root postinst has no business
writing to user dotfiles and cannot know which accounts want the override — so
shell-install is a separate, per-user, idempotent step.

python3-pyqt6 is a Recommends rather than a Depends, so this still installs on
a headless box without dragging Qt in.

The prompt is a browser

One screenful is twenty-odd repositories and the ranking behind it is routinely
two hundred plus, so a prompt that only took a number could not reach most of
what it had just numbered.

Reply Does
23 cd into entry 23 — numbers are the ranking, not the page
text search labels and paths, case-insensitive
/ clear the search
+ next page
- back to the top of the view
a the whole view, unpaged
? help
enter, q, ctrl-d stay put
… 238 more, numbered 21-258 · lsrepos --all to see them
→ number, text to search, + more, ? help, enter stays: noisy
 79 noisycity-api-blueprint
… 1-1 of 1 matching "noisy" · end
→ number, text to search, + more, ? help, enter stays: 79
/home/you/repos/github/smart-home/noisycity-api-blueprint

Numbers are ranking positions, so filtering and paging never renumber: 79 means
the same repository on the first screen, inside a search, and via
lsrecent path 79 tomorrow.

It stays line-oriented rather than taking over the screen. The listing is meant to
stay in your scrollback with its numbers still usable after you have moved on, and
an alternate-screen TUI would wipe exactly that on exit.

lsrecent-gui

A small PyQt6 window for choosing which directories the override applies in —
lsrecent gui, or lsrecent Directories in the launcher. It holds no state of
its own: rows come from lsrecent list, changes go through add/remove. It
flags entries whose directory has since been deleted, which is otherwise invisible.

Also in this release

  • The binary and the shell functions version independently, and a terminal left
    open across an upgrade keeps the old functions. That used to present as the cd
    prompt silently not appearing; shell-init now exports its version and the
    binary says so instead. lsrecent --version reports both halves.
  • remove built a sed address by interpolating the path, so any path containing
    the delimiter deleted nothing and reported success anyway.
  • Man pages, generated from --help, which is itself generated from the source
    header — one source, three views.