Skip to content

v1.8.0 — a bucket you can scan

Latest

Choose a tag to compare

@danielrosehill danielrosehill released this 30 Jul 13:45
· 12 commits to master since this release

Repositories are now listed alphabetically within each recency bucket. The buckets themselves still run newest-first, and that is still where the recency lives.

Why

Sorting inside a bucket by recency too ranked repos by a distinction the timestamps cannot really support. Everything in PAST WEEK is a week old, and which of two of them you touched at 14:02 and which at 11:40 is not something you know or can predict. The effect was that a name's position kept moving between listings for reasons nothing on screen explained — so the only way to find a repo you already had in mind was to read the group from the top.

Groups are the part you can read off the screen. Inside one, entries are peers, so a stable position is worth more than a meaningless ranking.

━━ TODAY ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  1 Cloud-Mounts        2 Driving-Checklists   3 HVAC_Repair_0726
  4 lsrecent            5 MCPJungle-Gateway    6 Twilio-Manager

Keeping the old order

It was the tool's premise for eleven versions, so it stays one flag away:

lsrepos -t                   # --time: newest-first within each bucket
lsrepos -n                   # --name: the new default, explicitly
export LSRECENT_SORT=time    # make --time the default everywhere

A flag on the command line always beats the environment variable. -t works on lsrepos, lstoday, lsyesterday and lsr <dir> alike.

One consequence worth knowing

When a listing is cut to one screenful, the bucket at the fold is now cut alphabetically rather than by age — what is missing from it is M–Z, not the oldest. Whole buckets are still dropped oldest-first.

This is only survivable because of v1.7.0: everything cut is still numbered, and the prompt searches and pages, so an elided repo is a + or a typed word away. Before that was true, cutting by age was the only defensible cut.

Also in this release

Carried over from 1.7.1, which was never published as a release:

  • shell-init unaliases the names before defining them as functions. A leftover alias from 1.1.1 or earlier — lsrepos, lstoday — expanded before the parser reached lsrepos(), so re-sourcing in a long-lived shell died with syntax error near unexpected token `(' and the eval abandoned the rest. Half the grouped views silently never got defined.

Install

sudo apt install ./lsrecent_1.8.0_all.deb
lsrecent shell-install     # once per user account, if you have not already

Then open a new terminal or source ~/.bashrc — the version handshake will report the shell half as stale until you do, even though it is unchanged in this release.