help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

operations on path lists


From: Samuel Wales
Subject: operations on path lists
Date: Fri, 3 Feb 2023 22:32:55 -0700

suppose i do

  find . -iname '*foo*' -type d | sort

and suppose that i want to copy these dirs to another dir, or so.  the
components and paths can be long.

it gets confusing, trying to interpret these paths.  what is
underneath what in the fs tree?

i'd like to do at least one of the following operations on this list.
i don't know which would be more clear in all cases.


1.  shortcut all subsequent paths

if a path is like ./.../...foo.../.../...foo..., then eliminate that line.
i.e. eliminate paths that have common prefix paths on any previous line.

2.  highlight adjacent subsequent paths' common components

if i have paths like

./hi/foo
./hi/there/foo
./whatever/whatever/foo

then i want line 2 to have ./hi/ highlighted.  i might also like this
one for, not paths, but lines, to show intra-component differences.
but in that case, it might be the difference i want highlghted, and it
need not be a prefix or a suffix.


is there anything like any of these in emacs?  i don't know of a cli
solution either.

-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]