broot icon indicating copy to clipboard operation
broot copied to clipboard

--show-gitignored, but do not enter

Open jaklan opened this issue 4 years ago • 6 comments

broot allows special paths in the config:

special_paths: {
    "/media/slow-backup-disk"             : no-enter
    "/home/dys/useless"                   : hide
    "/home/dys/my-link-I-want-to-explore" : enter
}

which are quite useful for dealing e.g. with .git folders:

special_paths: {
    "**/.git": no-enter
}

so they are still visible in broot (especially when used as a replaced for tree), but don't mess the output with their content.

It would be nice to achieve similar effect with git-ignored directores.

jaklan avatar Jun 25 '21 12:06 jaklan

Reformulation: It looks to me that the solution would be

  • a new mode in which gitignored files are displayed but not automatically entered
  • the verbs toggling this mode

Canop avatar Jun 25 '21 12:06 Canop

@Canop did you ever resolve this issue?

faelin avatar Jun 06 '22 19:06 faelin

@faelin I didn't. I'm not even sure of the needs or best ergonomics here. Comments welcome.

(most especially, as I'm dealing with a dozen projects atm, I have to estimate priorities and people telling they're interested are probably the best hint to me)

Canop avatar Jun 06 '22 19:06 Canop

I agree with your reformulation, except that only directories that are git-ignored should be shown (and not entered), while git-ignored file nodes should remain hidden by default.

faelin avatar Jun 06 '22 19:06 faelin

As a separate (but related) request—which I might move into a separate [feature request] issue—it would be extremely nice to be able to pass special-paths to broot via CLI flags, as in

$> broot --hide="/home/dys/useless" --no-enter="/media/slow-backup-disk" --no-enter="**/.git" --enter="/home/dys/git-ignored-path"

(not that in my example, flags can be repeated multiple times, but semicolon-separated paths might be acceptable instead)

faelin avatar Jun 06 '22 19:06 faelin

Not sure about the best arg syntax but this feature sounds reasonable and with no downside. Please create a separate issue for it.

Canop avatar Jun 06 '22 20:06 Canop