htop icon indicating copy to clipboard operation
htop copied to clipboard

Feature request: Collapse all children in tree view

Open eigan opened this issue 6 years ago • 5 comments

I would like to get to the following view as soon as possible. Currently that means f6 down f6 down ..

image

Solutions that I would be happy with:

  • A shortcut to toggle all children of selected, for instance shift f6.
  • Tree view have collapsed all by default (recursive). Expand will just expand the selected element, not recursive.

Relevant issues at original htop-repo:

  • https://github.com/hishamhm/htop/issues/24 (latest responses argue that it should be collapsed by default)
  • https://github.com/hishamhm/htop/pull/510 (pull request for collapse all)

eigan avatar Sep 02 '20 05:09 eigan

+1 for hishamhm/htop#510

volklord avatar Sep 04 '20 15:09 volklord

+1 why it isn't already implemented is beyond me, please dev!

Because nobody had the time to properly review and test a working patch for it yet.

On that note: The patch for https://github.com/hishamhm/htop/pull/510 LGTM and kinda reasonable. Only thing It'd suggest checking is if the collapsed-by-default should exclude PID 1, as having just PID 1 show up when collapsing by default is kinda counterproductive.

BenBE avatar Sep 09 '20 06:09 BenBE

This is supposed to be merged in 2021 Just tried the star keys with ubuntu 24.04 and it does not work.

caramboleyo-no2fa avatar Sep 21 '24 08:09 caramboleyo-no2fa

The Ubuntu release 24.04 has htop 3.3.0-4 and the functionality is included there.

fasterit avatar Sep 21 '24 12:09 fasterit

yes it is! was in an old 22.04 terminal, now in 24.04 it does work.

caramboleyo-no2fa avatar Sep 21 '24 13:09 caramboleyo-no2fa