|
From: | Dragan Simic |
Subject: | Re: Coreutils enhancement: ls: add colorization of mountpoints |
Date: | Mon, 16 Oct 2023 23:59:02 +0200 |
On 2023-10-16 23:50, Parke wrote:
Hello, coreutils@gnu.org,
Hello! :)
I am contemplating extending ls so that mountpoints can be colorized (via LS_COLORS). If I implement this change, I would be happy to contribute it to Coreutils, if the maintainers want this change. My use case: I want to be able to quickly distinguish Btrfs subvolumes (and ZFS datasets) from plain directories. I'm hoping that a mountpoint can be detected by comparing the st_dev fields returned by calling stat() on a directory and on that directory's parent.
Wouldn't that actually introduce a significant performance overhead?
There are some related choices: Should non-directory mounts also be colorable? Should mount colors be subdivided as directories are, namely: based on the sticky-bit and the other-writable-bit. Comments welcome.
[Prev in Thread] | Current Thread | [Next in Thread] |